Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
Change-Id: I2767a27514c1502642b09ffcbe4422288ff9b6dc
  • Loading branch information
Songwen Ding committed Jul 15, 2019
0 parents commit 95909d6
Show file tree
Hide file tree
Showing 49 changed files with 9,535 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
Packages/
Package.pins
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
Carthage/Checkouts
Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
6 changes: 6 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
identifier_name:
excluded: # excluded via string array
- id
- uid
- x
- y
7 changes: 7 additions & 0 deletions .travis,yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: swift
osx_image: xcode11
before_install:
script:
- xcodebuild clean -scheme FlexLayout | xcpretty

- xcodebuild -project FlexLayout.xcodeproj -scheme FlexLayout -destination 'name=Generic iOS Device' | xcpretty
558 changes: 558 additions & 0 deletions FlexLayout.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "Extension",
"repositoryURL": "https://github.com/DingSoung/Extension",
"state": {
"branch": "master",
"revision": "1c3585d641ca93f4bfd3236edcc53ec3df9077b7",
"version": null
}
}
]
},
"version": 1
}
67 changes: 67 additions & 0 deletions FlexLayout.xcodeproj/xcshareddata/xcschemes/FlexLayout.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CEF0E31622DC57560000C940"
BuildableName = "FlexLayout.framework"
BlueprintName = "FlexLayout"
ReferencedContainer = "container:FlexLayout.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CEF0E31622DC57560000C940"
BuildableName = "FlexLayout.framework"
BlueprintName = "FlexLayout"
ReferencedContainer = "container:FlexLayout.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
20 changes: 20 additions & 0 deletions FlexLayout/FlexLayout.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// FlexLayout.h
// FlexLayout
//
// Created by Songwen Ding on 2019/7/15.
// Copyright © 2019 Songwen Ding. All rights reserved.
//

#import <Foundation/Foundation.h>

//! Project version number for FlexLayout.
FOUNDATION_EXPORT double FlexLayoutVersionNumber;

//! Project version string for FlexLayout.
FOUNDATION_EXPORT const unsigned char FlexLayoutVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <FlexLayout/PublicHeader.h>


#import "Header.h"
22 changes: 22 additions & 0 deletions FlexLayout/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>
17 changes: 17 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
22 changes: 22 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// swift-tools-version:5.0.0

import PackageDescription

let package = Package(
name: "FlexLayout",
platforms: [
.iOS(.v8)
],
products: [
.library(name: "FlexLayout", targets: ["FlexLayout"])
],
dependencies: [
.package(url: "https://github.com/DingSoung/Extension", from: "0.8.9")
],
targets: [
.target(name: "FlexLayout", path: "Sources")
],
swiftLanguageVersions: [
.version("5.0.0")
]
)
41 changes: 41 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
![Release](https://img.shields.io/github/release/DingSoung/FlexLayout.svg)
![Status](https://travis-ci.org/DingSoung/FlexLayout.svg?branch=master)

![SwiftPackage](https://img.shields.io/badge/SwiftPackage-compatible-E66848.svg?style=flat)

![Language](https://img.shields.io/badge/Swift-5-FFAC45.svg?style=flat)

[![Donate](https://img.shields.io/badge/Donate-PayPal-9EA59D.svg)](https://paypal.me/DingSongwen)

A CSS Flex Layout for iOS

# Install

carthage

```swift
github DingSoung/Extension.git master
```

# Usage

```swift
let layout = FlexLayout()
layout.marginLeft = "10"
layout.width = 300
layout.height = 300
layout.marginTop = 100
layout.alignItems = .flexStart
layout.flexDirection = .row
layout.borderWidth = "3"

let layout2 = FlexLayout()
layout2.aspectRatio = 1
layout2.width = 20%
layout2.margin = 8

layout.set(children: [layout2])
_ = layout.intrinsicSize
print(layout.frame, layout.frame)
```

Loading

0 comments on commit 95909d6

Please sign in to comment.