Skip to content

Commit f2e6c8f

Browse files
authored
Merge pull request #165 from layoutBox/add_animation_example
Add Animation documentation
2 parents 41005c4 + b58028a commit f2e6c8f

File tree

71 files changed

+831
-318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+831
-318
lines changed

.circleci/config.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.codeclimate.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.tailor.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode9.3
2+
osx_image: xcode9.4
33
cache: bundler
44

55
install:

Example/PinLayoutSample.xcodeproj/project.pbxproj

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,15 @@
4444
24F75B5B1EE5644E008DB567 /* IntroView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24F75B591EE5644E008DB567 /* IntroView.swift */; };
4545
24F75B5C1EE5644E008DB567 /* IntroViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24F75B5A1EE5644E008DB567 /* IntroViewController.swift */; };
4646
DE6C3D736B571B80E207DF6A /* Pods_PinLayoutSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAD69688AA2A3F0994F3074E /* Pods_PinLayoutSample.framework */; };
47+
DF390898211900320049FD56 /* AnimationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF390897211900320049FD56 /* AnimationsView.swift */; };
48+
DF39089A211900480049FD56 /* AnimationsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF390899211900480049FD56 /* AnimationsViewController.swift */; };
4749
DF4C1AA4205AEDFC00DED50B /* SafeAreaView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF4C1AA0205AEDFC00DED50B /* SafeAreaView.swift */; };
4850
DF4C1AA5205AEDFC00DED50B /* SafeAreaViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF4C1AA1205AEDFC00DED50B /* SafeAreaViewController.swift */; };
4951
DF4C1AAA205AF10900DED50B /* RoundedButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF4C1AA7205AF10900DED50B /* RoundedButton.swift */; };
5052
DF4C1AAE205AF78A00DED50B /* SafeAreaCornersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF4C1AAC205AF78A00DED50B /* SafeAreaCornersViewController.swift */; };
5153
DF4C1AAF205AF78A00DED50B /* SafeAreaCornersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF4C1AAD205AF78A00DED50B /* SafeAreaCornersView.swift */; };
54+
DFD27841211B1A710056BD93 /* UINavigationController+Orientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFD27840211B1A700056BD93 /* UINavigationController+Orientation.swift */; };
55+
DFD27848211B1D090056BD93 /* UITabBarController+Orientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFD27847211B1D090056BD93 /* UITabBarController+Orientation.swift */; };
5256
DFEAF74A20C9648A00E33147 /* WrapContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFEAF74920C9648A00E33147 /* WrapContentView.swift */; };
5357
DFEAF74C20C9649F00E33147 /* WrapContentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFEAF74B20C9649F00E33147 /* WrapContentViewController.swift */; };
5458
/* End PBXBuildFile section */
@@ -174,11 +178,15 @@
174178
A35A00E6536E49A548E763E6 /* Pods-PinLayoutSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PinLayoutSample.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-PinLayoutSample/Pods-PinLayoutSample.debug.xcconfig"; sourceTree = "<group>"; };
175179
AAD69688AA2A3F0994F3074E /* Pods_PinLayoutSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PinLayoutSample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
176180
C589624E868FCB20F7C10918 /* Pods-PinLayoutSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PinLayoutSample.release.xcconfig"; path = "../Pods/Target Support Files/Pods-PinLayoutSample/Pods-PinLayoutSample.release.xcconfig"; sourceTree = "<group>"; };
181+
DF390897211900320049FD56 /* AnimationsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AnimationsView.swift; path = PinLayoutSample/UI/Examples/Animations/AnimationsView.swift; sourceTree = SOURCE_ROOT; };
182+
DF390899211900480049FD56 /* AnimationsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationsViewController.swift; sourceTree = "<group>"; };
177183
DF4C1AA0205AEDFC00DED50B /* SafeAreaView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SafeAreaView.swift; sourceTree = "<group>"; };
178184
DF4C1AA1205AEDFC00DED50B /* SafeAreaViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SafeAreaViewController.swift; sourceTree = "<group>"; };
179185
DF4C1AA7205AF10900DED50B /* RoundedButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoundedButton.swift; sourceTree = "<group>"; };
180186
DF4C1AAC205AF78A00DED50B /* SafeAreaCornersViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SafeAreaCornersViewController.swift; sourceTree = "<group>"; };
181187
DF4C1AAD205AF78A00DED50B /* SafeAreaCornersView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SafeAreaCornersView.swift; sourceTree = "<group>"; };
188+
DFD27840211B1A700056BD93 /* UINavigationController+Orientation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UINavigationController+Orientation.swift"; sourceTree = "<group>"; };
189+
DFD27847211B1D090056BD93 /* UITabBarController+Orientation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITabBarController+Orientation.swift"; sourceTree = "<group>"; };
182190
DFEAF74920C9648A00E33147 /* WrapContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WrapContentView.swift; sourceTree = "<group>"; };
183191
DFEAF74B20C9649F00E33147 /* WrapContentViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WrapContentViewController.swift; sourceTree = "<group>"; };
184192
/* End PBXFileReference section */
@@ -249,6 +257,7 @@
249257
24F2460C1FA8D4D100B6332E /* CollectionViewExample */,
250258
DF4C1A9F205AEDFC00DED50B /* SafeArea */,
251259
DFEAF71520C840F300E33147 /* WrapContent */,
260+
DF3908912118FFF20049FD56 /* Animations */,
252261
2497CFEA1EF40B8100DFD13B /* Form */,
253262
24D18D181F3DECD6008129EF /* IntroRTL */,
254263
2416376F1F8E4BC200EE703A /* IntroObjectiveC */,
@@ -267,6 +276,8 @@
267276
249326881EEEEE3D00BCB814 /* Stylesheet.swift */,
268277
247157931F87BD680003424F /* UIEdgeInsets+PinLayout.swift */,
269278
24F246131FA8D57100B6332E /* UIImageView+Download.swift */,
279+
DFD27840211B1A700056BD93 /* UINavigationController+Orientation.swift */,
280+
DFD27847211B1D090056BD93 /* UITabBarController+Orientation.swift */,
270281
);
271282
path = Common;
272283
sourceTree = "<group>";
@@ -411,6 +422,15 @@
411422
path = Intro;
412423
sourceTree = "<group>";
413424
};
425+
DF3908912118FFF20049FD56 /* Animations */ = {
426+
isa = PBXGroup;
427+
children = (
428+
DF390897211900320049FD56 /* AnimationsView.swift */,
429+
DF390899211900480049FD56 /* AnimationsViewController.swift */,
430+
);
431+
path = Animations;
432+
sourceTree = "<group>";
433+
};
414434
DF4C1A9F205AEDFC00DED50B /* SafeArea */ = {
415435
isa = PBXGroup;
416436
children = (
@@ -491,7 +511,7 @@
491511
isa = PBXProject;
492512
attributes = {
493513
LastSwiftUpdateCheck = 0900;
494-
LastUpgradeCheck = 0900;
514+
LastUpgradeCheck = 0940;
495515
ORGANIZATIONNAME = layoutbox;
496516
TargetAttributes = {
497517
249EFE3E1E64FAFE00165E39 = {
@@ -604,7 +624,7 @@
604624
inputPaths = (
605625
"${SRCROOT}/../Pods/Target Support Files/Pods-PinLayoutSample/Pods-PinLayoutSample-frameworks.sh",
606626
"${BUILT_PRODUCTS_DIR}/PinLayout/PinLayout.framework",
607-
"${PODS_ROOT}/Reveal-SDK/RevealServer-16/iOS/RevealServer.framework",
627+
"${PODS_ROOT}/Reveal-SDK/RevealServer-17/iOS/RevealServer.framework",
608628
);
609629
name = "[CP] Embed Pods Frameworks";
610630
outputPaths = (
@@ -646,6 +666,7 @@
646666
24DA374B1EF7F90600D1AB2F /* BaseFormView.swift in Sources */,
647667
24F75B5C1EE5644E008DB567 /* IntroViewController.swift in Sources */,
648668
241637741F8E4BC200EE703A /* IntroObjectiveCViewController.m in Sources */,
669+
DF390898211900320049FD56 /* AnimationsView.swift in Sources */,
649670
2439CC541E665C6B003326FB /* RelativeView.swift in Sources */,
650671
2439CC551E665C6B003326FB /* RelativeViewController.swift in Sources */,
651672
247157941F87BD680003424F /* UIEdgeInsets+PinLayout.swift in Sources */,
@@ -654,11 +675,13 @@
654675
24F246121FA8D4D100B6332E /* HouseCell.swift in Sources */,
655676
DF4C1AAE205AF78A00DED50B /* SafeAreaCornersViewController.swift in Sources */,
656677
24A9C2031EF16A3E00F2CF64 /* AutoAdjustingSizeView.swift in Sources */,
678+
DFD27848211B1D090056BD93 /* UITabBarController+Orientation.swift in Sources */,
657679
24D18D1D1F3DED0D008129EF /* IntroRTLView.swift in Sources */,
658680
DF4C1AAA205AF10900DED50B /* RoundedButton.swift in Sources */,
659681
2439CC351E665BF6003326FB /* MenuView.swift in Sources */,
660682
2439CC4B1E665C6B003326FB /* BasicView.swift in Sources */,
661683
24A9C1F61EF054BF00F2CF64 /* MethodCell.swift in Sources */,
684+
DFD27841211B1A710056BD93 /* UINavigationController+Orientation.swift in Sources */,
662685
24A9C2041EF16A3E00F2CF64 /* AutoAdjustingSizeViewController.swift in Sources */,
663686
24CB999C1F29059B004EA7FB /* AdjustToContainerView.swift in Sources */,
664687
2497CFED1EF40B9100DFD13B /* FormView.swift in Sources */,
@@ -676,6 +699,7 @@
676699
241637771F8E4F9100EE703A /* IntroObjectiveCView.m in Sources */,
677700
24CB99A01F290664004EA7FB /* ChoiceSelectorView.swift in Sources */,
678701
249326891EEEEE3D00BCB814 /* Stylesheet.swift in Sources */,
702+
DF39089A211900480049FD56 /* AnimationsViewController.swift in Sources */,
679703
2439CC521E665C6B003326FB /* MultiRelativeView.swift in Sources */,
680704
24F246101FA8D4D100B6332E /* CollectionViewExampleView.swift in Sources */,
681705
24A9C1F21EF0542F00F2CF64 /* TableViewExampleView.swift in Sources */,
@@ -719,13 +743,15 @@
719743
CLANG_WARN_BOOL_CONVERSION = YES;
720744
CLANG_WARN_COMMA = YES;
721745
CLANG_WARN_CONSTANT_CONVERSION = YES;
746+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
722747
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
723748
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
724749
CLANG_WARN_EMPTY_BODY = YES;
725750
CLANG_WARN_ENUM_CONVERSION = YES;
726751
CLANG_WARN_INFINITE_RECURSION = YES;
727752
CLANG_WARN_INT_CONVERSION = YES;
728753
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
754+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
729755
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
730756
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
731757
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -775,13 +801,15 @@
775801
CLANG_WARN_BOOL_CONVERSION = YES;
776802
CLANG_WARN_COMMA = YES;
777803
CLANG_WARN_CONSTANT_CONVERSION = YES;
804+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
778805
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
779806
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
780807
CLANG_WARN_EMPTY_BODY = YES;
781808
CLANG_WARN_ENUM_CONVERSION = YES;
782809
CLANG_WARN_INFINITE_RECURSION = YES;
783810
CLANG_WARN_INT_CONVERSION = YES;
784811
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
812+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
785813
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
786814
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
787815
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;

Example/PinLayoutSample/Supporting Files/Info.plist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@
3131
<string>UIInterfaceOrientationPortrait</string>
3232
<string>UIInterfaceOrientationLandscapeLeft</string>
3333
<string>UIInterfaceOrientationLandscapeRight</string>
34-
<string>UIInterfaceOrientationPortraitUpsideDown</string>
3534
</array>
3635
<key>UISupportedInterfaceOrientations~ipad</key>
3736
<array>
3837
<string>UIInterfaceOrientationPortrait</string>
39-
<string>UIInterfaceOrientationPortraitUpsideDown</string>
4038
<string>UIInterfaceOrientationLandscapeLeft</string>
4139
<string>UIInterfaceOrientationLandscapeRight</string>
4240
</array>

Example/PinLayoutSample/UI/Common/BaseFormView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ class BaseFormView: UIView {
6767
resetScrollOffset()
6868
}
6969

70-
fileprivate func resetScrollOffset() {
70+
private func resetScrollOffset() {
7171
guard formScrollView.contentInset != .zero else { return }
7272
setFormScrollView(bottomInset: 0)
7373
}
7474

75-
fileprivate func setFormScrollView(bottomInset: CGFloat) {
75+
private func setFormScrollView(bottomInset: CGFloat) {
7676
formScrollView.contentInset = UIEdgeInsets(top: formScrollView.contentInset.top, left: 0,
7777
bottom: bottomInset, right: 0)
7878
}

Example/PinLayoutSample/UI/Common/BasicView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import UIKit
2121

2222
class BasicView: UIView {
23-
fileprivate let label = UILabel()
23+
private let label = UILabel()
2424

2525
init(text: String? = nil, color: UIColor) {
2626
super.init(frame: .zero)

Example/PinLayoutSample/UI/Common/UIEdgeInsets+PinLayout.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extension UIEdgeInsets {
3838
right: minValue(self.right, minValue: dx))
3939
}
4040

41-
fileprivate func minValue(_ value: CGFloat, minValue: CGFloat) -> CGFloat {
41+
private func minValue(_ value: CGFloat, minValue: CGFloat) -> CGFloat {
4242
return value >= minValue ? value : minValue
4343
}
4444
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Copyright (c) 2017 Luc Dion
2+
// Permission is hereby granted, free of charge, to any person obtaining a copy
3+
// of this software and associated documentation files (the "Software"), to deal
4+
// in the Software without restriction, including without limitation the rights
5+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
// copies of the Software, and to permit persons to whom the Software is
7+
// furnished to do so, subject to the following conditions:
8+
//
9+
// The above copyright notice and this permission notice shall be included in
10+
// all copies or substantial portions of the Software.
11+
//
12+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18+
// THE SOFTWARE.
19+
import UIKit
20+
21+
extension UINavigationController {
22+
open override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
23+
if let visibleViewControllerOrientations = visibleViewController?.supportedInterfaceOrientations {
24+
return visibleViewControllerOrientations
25+
} else {
26+
return .all
27+
}
28+
}
29+
30+
open override var shouldAutorotate: Bool {
31+
return visibleViewController?.shouldAutorotate ?? super.shouldAutorotate
32+
}
33+
}

0 commit comments

Comments
 (0)