Skip to content

Commit

Permalink
Merge branch 'Side-shoosing'
Browse files Browse the repository at this point in the history
  • Loading branch information
stason314 committed Jul 25, 2019
2 parents e09ccef + 17bb12b commit 54e3688
Show file tree
Hide file tree
Showing 15 changed files with 369 additions and 30 deletions.
3 changes: 2 additions & 1 deletion Example/FramezillaExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Nikita Ermolenko";
ORGANIZATIONNAME = Rosberry;
TargetAttributes = {
8442F94E1EC75C9C00B72551 = {
CreatedOnToolsVersion = 8.3.2;
Expand All @@ -159,6 +159,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down
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,10 @@
<?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>FILEHEADER</key>
<string>
// Copyright © ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved.
//</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
Expand Down Expand Up @@ -30,6 +40,16 @@
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
Expand Down Expand Up @@ -59,6 +79,16 @@
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
20 changes: 17 additions & 3 deletions Framezilla.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
8497C0111E59EB7700447E2F /* Number.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8497C0101E59EB7700447E2F /* Number.swift */; };
8497C0131E59FA4B00447E2F /* Array+Stack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8497C0121E59FA4B00447E2F /* Array+Stack.swift */; };
84EDCC241F9B3AB10091FAB9 /* MakerSafeAreaTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84EDCC231F9B3AB10091FAB9 /* MakerSafeAreaTests.swift */; };
85221C0022E99D4100EA9D3D /* OptionSet+ForEeach.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85221BFF22E99D4100EA9D3D /* OptionSet+ForEeach.swift */; };
852FEEE322D473F200B79A6C /* ExtensionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 852FEEE222D473F200B79A6C /* ExtensionsTests.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -69,6 +71,8 @@
8497C0101E59EB7700447E2F /* Number.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Number.swift; sourceTree = "<group>"; };
8497C0121E59FA4B00447E2F /* Array+Stack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Array+Stack.swift"; sourceTree = "<group>"; };
84EDCC231F9B3AB10091FAB9 /* MakerSafeAreaTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MakerSafeAreaTests.swift; sourceTree = "<group>"; };
85221BFF22E99D4100EA9D3D /* OptionSet+ForEeach.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OptionSet+ForEeach.swift"; sourceTree = "<group>"; };
852FEEE222D473F200B79A6C /* ExtensionsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionsTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -125,6 +129,7 @@
8497C0121E59FA4B00447E2F /* Array+Stack.swift */,
842BB7FB1F0638E9000D1CFF /* Parameters.swift */,
844BE8F220457634004C19A8 /* Maker+Unavailable.swift */,
85221BFF22E99D4100EA9D3D /* OptionSet+ForEeach.swift */,
);
path = Sources;
sourceTree = "<group>";
Expand All @@ -144,6 +149,7 @@
8442F93D1EC75A8500B72551 /* StateTests.swift */,
845108061EE2F5BC006DC1C8 /* ScrollViewTests.swift */,
841192DC1FF205DC00AB255D /* ContainerTests.swift */,
852FEEE222D473F200B79A6C /* ExtensionsTests.swift */,
);
path = Tests;
sourceTree = "<group>";
Expand Down Expand Up @@ -206,7 +212,8 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0800;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = Rosberry;
TargetAttributes = {
115972131D8450F500BC5C20 = {
CreatedOnToolsVersion = 8.0;
Expand All @@ -225,6 +232,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 11FB41261D844CD800700A40;
Expand Down Expand Up @@ -281,6 +289,7 @@
8442F9451EC75A8500B72551 /* StateTests.swift in Sources */,
841192DD1FF205DC00AB255D /* ContainerTests.swift in Sources */,
8442F9411EC75A8500B72551 /* MakerCenterTests.swift in Sources */,
852FEEE322D473F200B79A6C /* ExtensionsTests.swift in Sources */,
8442F9421EC75A8500B72551 /* MakerStackTests.swift in Sources */,
8442F9401EC75A8500B72551 /* MakerBothSideRelationsTests.swift in Sources */,
845108071EE2F5BC006DC1C8 /* ScrollViewTests.swift in Sources */,
Expand All @@ -296,6 +305,7 @@
files = (
11FB41461D844F8F00700A40 /* Maker+Configurations.swift in Sources */,
11FB41451D844F8F00700A40 /* Maker.swift in Sources */,
85221C0022E99D4100EA9D3D /* OptionSet+ForEeach.swift in Sources */,
8497C0111E59EB7700447E2F /* Number.swift in Sources */,
11FB41471D844F8F00700A40 /* MakerHelper.swift in Sources */,
8497C0131E59FA4B00447E2F /* Array+Stack.swift in Sources */,
Expand Down Expand Up @@ -433,11 +443,13 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
Expand All @@ -464,11 +476,13 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
Expand Down Expand Up @@ -544,7 +558,7 @@
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
Expand Down Expand Up @@ -602,7 +616,7 @@
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand Down
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>
10 changes: 10 additions & 0 deletions Framezilla.xcodeproj/xcshareddata/IDETemplateMacros.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?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>FILEHEADER</key>
<string>
// Copyright © ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved.
//</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand Down Expand Up @@ -57,7 +56,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
codeCoverageEnabled = "YES"
onlyGenerateCoverageForSpecifiedTargets = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<CodeCoverageTargets>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "11FB41311D844D2B00700A40"
BuildableName = "Framezilla.framework"
BlueprintName = "Framezilla iOS"
ReferencedContainer = "container:Framezilla.xcodeproj">
</BuildableReference>
</CodeCoverageTargets>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "115972131D8450F500BC5C20"
BuildableName = "FramezillaTests.xctest"
BlueprintName = "FramezillaTests"
ReferencedContainer = "container:Framezilla.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</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">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,21 @@ view.configureFrame { maker in
```
the second method has optional parameters, so ```maker.edges(top: 5, left: 5, bottom: 5)``` also works correct, but does not create ```right``` relation, that in some cases is very useful.

Also if you have `UIEdgeInsets` property and you want to use cup of them you can use

```swift
let insets: UIEdgeInsets = .init(top: 15, left: 10, bottom: 20, right: 10)
view.configureFrame { maker in
maker.edges(insets: insets, sides: [.left, .right])
}
```
or
```swift
view.configureFrame { maker in
maker.edges(insets: insets, sides: .horizontal)
}
```

## Side relations (Top, left, bottom, right)

You can create edge relation, as shown above, but only use side relations.
Expand Down
2 changes: 1 addition & 1 deletion Sources/Array+Stack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public enum StackAxis: Int {
case vertical
}

public extension Collection where Iterator.Element: UIView, Self.Index == Int, Self.IndexDistance == Int {
public extension Collection where Iterator.Element: UIView, Self.Index == Int {

/// Arranges views in the order of list along a vertical or horizontal axis, with spacing property.
///
Expand Down
Loading

0 comments on commit 54e3688

Please sign in to comment.