├── .swift-version
├── .swift-version.save
├── .travis.yml
├── EasyTransition.gif
├── EasyTransition.podspec
├── EasyTransition
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── 100.png
│ │ ├── 114.png
│ │ ├── 120.png
│ │ ├── 144.png
│ │ ├── 152.png
│ │ ├── 167.png
│ │ ├── 180.png
│ │ ├── 29.png
│ │ ├── 40.png
│ │ ├── 50.png
│ │ ├── 57.png
│ │ ├── 58.png
│ │ ├── 72.png
│ │ ├── 76.png
│ │ ├── 80.png
│ │ ├── 87.png
│ │ └── Contents.json
│ ├── Contents.json
│ ├── New Folder
│ │ ├── Contents.json
│ │ ├── bg1.imageset
│ │ │ ├── Contents.json
│ │ │ └── photo-1428999418909-363f8e091c50.jpeg
│ │ ├── bg2.imageset
│ │ │ ├── Contents.json
│ │ │ └── photo-1433148749784-5e235e9efd12.jpeg
│ │ ├── bg3.imageset
│ │ │ ├── Contents.json
│ │ │ └── photo-1442405740009-7b57cca9d316.jpeg
│ │ ├── bg4.imageset
│ │ │ ├── Contents.json
│ │ │ └── photo-1445964047600-cdbdb873673d.jpeg
│ │ ├── bg5.imageset
│ │ │ ├── Contents.json
│ │ │ └── OnRKhvlFQ2uJNSx5O3cc_DSC00560.jpg
│ │ ├── bg6.imageset
│ │ │ ├── Contents.json
│ │ │ └── photo-1429277158984-614d155e0017.jpeg
│ │ └── bg7.imageset
│ │ │ ├── Contents.json
│ │ │ └── photo-1416339684178-3a239570f315.jpeg
│ ├── pink_rice.imageset
│ │ ├── Contents.json
│ │ └── pink_rice.png
│ └── symphony.imageset
│ │ ├── Contents.json
│ │ └── symphony.png
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── EasyTransition.h
├── EasyTransition.swift
├── ExampleInfo.plist
├── Info.plist
├── InfoPlist.strings
├── UIView+Constraints.swift
└── ViewController.swift
├── EasyTransitionExample.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcshareddata
│ └── xcschemes
│ │ ├── EasyTransition.xcscheme
│ │ └── EasyTransitionExample.xcscheme
└── xcuserdata
│ └── indevizible.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ └── xcschememanagement.plist
├── LICENSE
└── README.md
/.swift-version:
--------------------------------------------------------------------------------
1 | 4.0
2 |
--------------------------------------------------------------------------------
/.swift-version.save:
--------------------------------------------------------------------------------
1 | 4.1
2 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | osx_image: xcode8
3 | env:
4 | global:
5 | - LC_CTYPE=en_US.UTF-8
6 | - LANG=en_US.UTF-8
7 | - PROJECT=EasyTransitionExample.xcodeproj
8 | - IOS_FRAMEWORK_SCHEME="EasyTransition"
9 | - IOS_SDK=iphonesimulator10.0
10 | - EXAMPLE_SCHEME="EasyTransitionExample"
11 | matrix:
12 | - DESTINATION="OS=8.4,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
13 | - DESTINATION="OS=9.0,name=iPhone 6 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
14 | - DESTINATION="OS=10.0,name=iPhone 6S" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
15 | - DESTINATION="OS=10.0,name=iPhone 6S Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
16 | - DESTINATION="OS=8.4,name=iPad Air" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
17 | - DESTINATION="OS=10.0,name=iPad Air 2" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
18 | script:
19 | - set -o pipefail
20 | - xcodebuild -version
21 | - xcodebuild -showsdks
22 |
23 | # Build Framework in Debug and Run Tests if specified
24 | - if [ $RUN_TESTS == "YES" ]; then
25 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test | xcpretty -c;
26 | else
27 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
28 | fi
29 |
30 | # Build Framework in ReleaseTest and Run Tests if specified
31 | - if [ $RUN_TESTS == "YES" ]; then
32 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration ReleaseTest ONLY_ACTIVE_ARCH=NO test | xcpretty -c;
33 | else
34 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration ReleaseTest ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
35 | fi
36 |
37 | # Build Example in Debug if specified
38 | - if [ $BUILD_EXAMPLE == "YES" ]; then
39 | xcodebuild -project "$PROJECT" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
40 | fi
41 |
42 | # Build Example in Release if specified
43 | - if [ $BUILD_EXAMPLE == "YES" ]; then
44 | xcodebuild -project "$PROJECT" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
45 | fi
46 |
47 | # Run `pod lib lint` if specified
48 | - if [ $POD_LINT == "YES" ]; then
49 | pod lib lint;
50 | fi
51 |
--------------------------------------------------------------------------------
/EasyTransition.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition.gif
--------------------------------------------------------------------------------
/EasyTransition.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "EasyTransition"
3 | s.version = "2.1"
4 | s.summary = "EasyTransition is a simple library for make a transition in iOS."
5 | s.homepage = "https://github.com/indevizible/EasyTransition"
6 | s.license = { :type => "MIT", :file => 'LICENSE' }
7 | s.authors = { "indevizible" => "jadedragon17650@gmail.com" }
8 |
9 | s.ios.deployment_target = "8.0"
10 | s.source = { :git => "https://github.com/indevizible/EasyTransition.git", :tag => "#{s.version}"}
11 | s.source_files = "EasyTransition/**/EasyTransition.swift","EasyTransition/**/UIView+Constraints.swift"
12 | s.requires_arc = true
13 | end
--------------------------------------------------------------------------------
/EasyTransition/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | // The MIT License (MIT)
2 | //
3 | // Copyright (c) 2016 - present Nattawut Singhchai
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 | //
23 |
24 |
25 | import UIKit
26 |
27 | @UIApplicationMain
28 | class AppDelegate: UIResponder, UIApplicationDelegate {
29 |
30 | var window: UIWindow?
31 |
32 |
33 | private func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
34 | // Override point for customization after application launch.
35 | application.statusBarStyle = .lightContent
36 | return true
37 | }
38 |
39 | func applicationWillResignActive(_ application: UIApplication) {
40 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
41 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
42 | }
43 |
44 | func applicationDidEnterBackground(_ application: UIApplication) {
45 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
46 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
47 | }
48 |
49 | func applicationWillEnterForeground(_ application: UIApplication) {
50 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
51 | }
52 |
53 | func applicationDidBecomeActive(_ application: UIApplication) {
54 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
55 | }
56 |
57 | func applicationWillTerminate(_ application: UIApplication) {
58 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
59 | }
60 |
61 |
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/100.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/114.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/120.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/144.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/152.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/167.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/180.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/29.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/40.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/50.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/57.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/58.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/72.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/76.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/80.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/AppIcon.appiconset/87.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "size" : "29x29",
15 | "idiom" : "iphone",
16 | "filename" : "29.png",
17 | "scale" : "1x"
18 | },
19 | {
20 | "size" : "29x29",
21 | "idiom" : "iphone",
22 | "filename" : "58.png",
23 | "scale" : "2x"
24 | },
25 | {
26 | "size" : "29x29",
27 | "idiom" : "iphone",
28 | "filename" : "87.png",
29 | "scale" : "3x"
30 | },
31 | {
32 | "size" : "40x40",
33 | "idiom" : "iphone",
34 | "filename" : "80.png",
35 | "scale" : "2x"
36 | },
37 | {
38 | "size" : "40x40",
39 | "idiom" : "iphone",
40 | "filename" : "120.png",
41 | "scale" : "3x"
42 | },
43 | {
44 | "size" : "57x57",
45 | "idiom" : "iphone",
46 | "filename" : "57.png",
47 | "scale" : "1x"
48 | },
49 | {
50 | "size" : "57x57",
51 | "idiom" : "iphone",
52 | "filename" : "114.png",
53 | "scale" : "2x"
54 | },
55 | {
56 | "size" : "60x60",
57 | "idiom" : "iphone",
58 | "filename" : "120.png",
59 | "scale" : "2x"
60 | },
61 | {
62 | "size" : "60x60",
63 | "idiom" : "iphone",
64 | "filename" : "180.png",
65 | "scale" : "3x"
66 | },
67 | {
68 | "idiom" : "ipad",
69 | "size" : "20x20",
70 | "scale" : "1x"
71 | },
72 | {
73 | "idiom" : "ipad",
74 | "size" : "20x20",
75 | "scale" : "2x"
76 | },
77 | {
78 | "size" : "29x29",
79 | "idiom" : "ipad",
80 | "filename" : "29.png",
81 | "scale" : "1x"
82 | },
83 | {
84 | "size" : "29x29",
85 | "idiom" : "ipad",
86 | "filename" : "58.png",
87 | "scale" : "2x"
88 | },
89 | {
90 | "size" : "40x40",
91 | "idiom" : "ipad",
92 | "filename" : "40.png",
93 | "scale" : "1x"
94 | },
95 | {
96 | "size" : "40x40",
97 | "idiom" : "ipad",
98 | "filename" : "80.png",
99 | "scale" : "2x"
100 | },
101 | {
102 | "size" : "50x50",
103 | "idiom" : "ipad",
104 | "filename" : "50.png",
105 | "scale" : "1x"
106 | },
107 | {
108 | "size" : "50x50",
109 | "idiom" : "ipad",
110 | "filename" : "100.png",
111 | "scale" : "2x"
112 | },
113 | {
114 | "size" : "72x72",
115 | "idiom" : "ipad",
116 | "filename" : "72.png",
117 | "scale" : "1x"
118 | },
119 | {
120 | "size" : "72x72",
121 | "idiom" : "ipad",
122 | "filename" : "144.png",
123 | "scale" : "2x"
124 | },
125 | {
126 | "size" : "76x76",
127 | "idiom" : "ipad",
128 | "filename" : "76.png",
129 | "scale" : "1x"
130 | },
131 | {
132 | "size" : "76x76",
133 | "idiom" : "ipad",
134 | "filename" : "152.png",
135 | "scale" : "2x"
136 | },
137 | {
138 | "size" : "83.5x83.5",
139 | "idiom" : "ipad",
140 | "filename" : "167.png",
141 | "scale" : "2x"
142 | },
143 | {
144 | "idiom" : "ios-marketing",
145 | "size" : "1024x1024",
146 | "scale" : "1x"
147 | }
148 | ],
149 | "info" : {
150 | "version" : 1,
151 | "author" : "xcode"
152 | }
153 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "photo-1428999418909-363f8e091c50.jpeg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg1.imageset/photo-1428999418909-363f8e091c50.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/New Folder/bg1.imageset/photo-1428999418909-363f8e091c50.jpeg
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "photo-1433148749784-5e235e9efd12.jpeg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg2.imageset/photo-1433148749784-5e235e9efd12.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/New Folder/bg2.imageset/photo-1433148749784-5e235e9efd12.jpeg
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "photo-1442405740009-7b57cca9d316.jpeg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg3.imageset/photo-1442405740009-7b57cca9d316.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/New Folder/bg3.imageset/photo-1442405740009-7b57cca9d316.jpeg
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg4.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "photo-1445964047600-cdbdb873673d.jpeg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg4.imageset/photo-1445964047600-cdbdb873673d.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/New Folder/bg4.imageset/photo-1445964047600-cdbdb873673d.jpeg
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg5.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "OnRKhvlFQ2uJNSx5O3cc_DSC00560.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg5.imageset/OnRKhvlFQ2uJNSx5O3cc_DSC00560.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/New Folder/bg5.imageset/OnRKhvlFQ2uJNSx5O3cc_DSC00560.jpg
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg6.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "photo-1429277158984-614d155e0017.jpeg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg6.imageset/photo-1429277158984-614d155e0017.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/New Folder/bg6.imageset/photo-1429277158984-614d155e0017.jpeg
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg7.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "photo-1416339684178-3a239570f315.jpeg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/New Folder/bg7.imageset/photo-1416339684178-3a239570f315.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/New Folder/bg7.imageset/photo-1416339684178-3a239570f315.jpeg
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/pink_rice.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "pink_rice.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/pink_rice.imageset/pink_rice.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/pink_rice.imageset/pink_rice.png
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/symphony.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "symphony.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/EasyTransition/Assets.xcassets/symphony.imageset/symphony.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/indevizible/EasyTransition/e977d563388776223fabfb4e7dc07a6130bbc24e/EasyTransition/Assets.xcassets/symphony.imageset/symphony.png
--------------------------------------------------------------------------------
/EasyTransition/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/EasyTransition/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
35 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
59 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
83 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
107 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
135 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
159 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
183 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
240 |
253 |
266 |
279 |
292 |
305 |
314 |
327 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
--------------------------------------------------------------------------------
/EasyTransition/EasyTransition.h:
--------------------------------------------------------------------------------
1 | //
2 | // EasyTransition.h
3 | // EasyTransition
4 | //
5 | // Created by Nattawut Singhchai on 1/10/16.
6 | // Copyright © 2016 Nattawut Singhchai. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for EasyTransition.
12 | FOUNDATION_EXPORT double EasyTransitionVersionNumber;
13 |
14 | //! Project version string for EasyTransition.
15 | FOUNDATION_EXPORT const unsigned char EasyTransitionVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/EasyTransition/EasyTransition.swift:
--------------------------------------------------------------------------------
1 | // The MIT License (MIT)
2 | //
3 | // Copyright (c) 2016 - present Nattawut Singhchai
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 | //
23 |
24 | import UIKit
25 |
26 | open class EasyTransition: UIPercentDrivenInteractiveTransition {
27 |
28 | open var transitionDuration: TimeInterval = 0.5
29 |
30 | // Percentage for pan dismiss [ 0.0 - 1.0]
31 |
32 | open var dismissalPercentCompleteThreshold: CGFloat = 0.2
33 |
34 | open var enableInteractiveDismissalTransition: Bool = true
35 |
36 | open var enableDismissTouchOutBound: Bool = true
37 |
38 | open var isInteractiveDissmalTransition = false
39 |
40 | // direction
41 | // Corner or Edge only
42 |
43 | open var direction: UIRectEdge = .left
44 |
45 | open var margins = UIEdgeInsets.zero
46 |
47 | open var sizeMax = CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude)
48 |
49 | open var sizeMin = CGSize.zero
50 |
51 | open var backgroundColor = UIColor.black.withAlphaComponent(0.5)
52 |
53 | open var zTransitionSize: CGFloat?
54 |
55 | open var blurEffectStyle: UIBlurEffectStyle?
56 |
57 | fileprivate var attachedViewController = UIViewController()
58 |
59 | fileprivate(set) weak var transitionContext: UIViewControllerContextTransitioning?
60 |
61 | fileprivate var isPresentation : Bool = false
62 |
63 | public init(attachedViewController: UIViewController) {
64 | super.init()
65 |
66 | self.attachedViewController = attachedViewController
67 |
68 | attachedViewController.transitioningDelegate = self
69 | attachedViewController.modalPresentationStyle = .custom
70 |
71 |
72 | let presentationPanGesture = UIPanGestureRecognizer()
73 | presentationPanGesture.addTarget(self, action: #selector(EasyTransition.dismissalPanGesture(_:)))
74 | attachedViewController.view.addGestureRecognizer(presentationPanGesture)
75 |
76 | }
77 |
78 | @objc func dismissalPanGesture(_ recognizer: UIPanGestureRecognizer) {
79 | if enableInteractiveDismissalTransition {
80 | isInteractiveDissmalTransition = recognizer.state == .began || recognizer.state == .changed
81 |
82 | switch recognizer.state {
83 | case .began: panGestureBegan(recognizer)
84 | case .changed: panGestureChanged(recognizer)
85 | case .cancelled, .ended: panGestureCancelledAndEnded(recognizer)
86 | default: break
87 | }
88 | }
89 | }
90 |
91 | override open func cancel() {
92 | completionSpeed = dismissalPercentCompleteThreshold
93 | super.cancel()
94 | }
95 |
96 | override open func finish() {
97 | completionSpeed = 1.0 - dismissalPercentCompleteThreshold
98 | super.finish()
99 | }
100 |
101 | fileprivate func panGestureBegan(_ recognizer: UIPanGestureRecognizer) {
102 | attachedViewController.dismiss(animated: true, completion: nil)
103 | }
104 |
105 | fileprivate func panGestureChanged(_ recognizer: UIPanGestureRecognizer) {
106 |
107 | let transition = recognizer.translation(in: attachedViewController.view)
108 |
109 | let transitionPercentage = CGPoint(x: transition.x / attachedViewController.view.bounds.size.width, y: transition.y / attachedViewController.view.bounds.size.height)
110 |
111 | var progress: CGPoint = CGPoint.zero
112 |
113 | if (direction.contains(.top) && transitionPercentage.y < 0) || (direction.contains(.bottom) && transitionPercentage.y > 0){
114 | progress.y = transitionPercentage.y
115 | }
116 |
117 | if (direction.contains(.left) && transitionPercentage.x < 0) || (direction.contains(.right) && transitionPercentage.x > 0){
118 | progress.x = transitionPercentage.x
119 | }
120 |
121 | update(sqrt(pow(progress.x, 2) + pow(progress.y,2))) //
122 | }
123 |
124 | fileprivate func panGestureCancelledAndEnded(_ recognizer: UIPanGestureRecognizer) {
125 | percentComplete > dismissalPercentCompleteThreshold ? finish() : cancel()
126 | }
127 | }
128 |
129 | extension EasyTransition : UIViewControllerTransitioningDelegate ,UIViewControllerAnimatedTransitioning {
130 |
131 | // TransitioningDelegate
132 |
133 | public func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? {
134 | let presentationController = PresentationController(presentedViewController:presented, presenting:presenting)
135 | presentationController.direction = direction
136 | presentationController.backgroundColor = backgroundColor
137 | presentationController.margins = margins
138 | presentationController.sizeMin = sizeMin
139 | presentationController.sizeMax = sizeMax
140 | presentationController.enableDismissTouchOutBound = enableDismissTouchOutBound
141 | presentationController.zTransitionSize = zTransitionSize
142 | presentationController.blurEffectStyle = blurEffectStyle
143 | return presentationController
144 | }
145 |
146 | public func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
147 | isPresentation = true
148 | return self
149 | }
150 |
151 | public func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
152 | isPresentation = false
153 | return self
154 | }
155 |
156 | public func interactionControllerForPresentation(using animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {
157 | return nil
158 | }
159 |
160 | public func interactionControllerForDismissal(using animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {
161 | return isInteractiveDissmalTransition ? self : nil
162 | }
163 |
164 | // Animate Transitioning
165 |
166 | public func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
167 | return transitionDuration
168 | }
169 |
170 | public func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
171 |
172 | self.transitionContext = transitionContext
173 | let containerView = transitionContext.containerView
174 |
175 | guard let fromVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.from),
176 | let toVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to)
177 | else {
178 | return
179 | }
180 |
181 |
182 | let fromView = fromVC.view
183 | let toView = toVC.view
184 |
185 | if toVC.isBeingPresented {
186 | // Presentation
187 | containerView.addSubview(toView!)
188 | }
189 |
190 | let animatingVC = isPresentation ? toVC : fromVC
191 | let animatingView = animatingVC.view
192 |
193 | let finalFrameForVC = transitionContext.finalFrame(for: animatingVC)
194 | var initialFrameForVC = finalFrameForVC
195 |
196 | if direction.contains(.right) {
197 | initialFrameForVC.origin.x += (initialFrameForVC.size.width + margins.right)
198 | }else if direction.contains(.left) {
199 | initialFrameForVC.origin.x -= (initialFrameForVC.size.width + margins.left)
200 | }
201 |
202 | if direction.contains(.bottom) {
203 | initialFrameForVC.origin.y += (initialFrameForVC.size.height + margins.bottom)
204 | }else if direction.contains(.top) {
205 | initialFrameForVC.origin.y -= (initialFrameForVC.size.height + margins.top)
206 | }
207 |
208 | let initialFrame = isPresentation ? initialFrameForVC : finalFrameForVC
209 | let finalFrame = isPresentation ? finalFrameForVC : initialFrameForVC
210 |
211 | animatingView?.frame = initialFrame
212 |
213 | let animations: (()->Void) = {
214 | animatingView?.frame = finalFrame
215 | }
216 |
217 | let completion = { (completed: Bool) in
218 | if !self.isPresentation && !transitionContext.transitionWasCancelled {
219 | fromView?.removeFromSuperview()
220 | }
221 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled)
222 | }
223 |
224 | if transitionContext.isInteractive {
225 | UIView.animate(withDuration: transitionDuration(using: transitionContext),
226 | animations: animations,
227 | completion: completion)
228 | }else{
229 | UIView.animate(withDuration: transitionDuration(using: transitionContext), delay:0, usingSpringWithDamping:500.0, initialSpringVelocity:2,
230 | options:UIViewAnimationOptions.allowUserInteraction,
231 | animations:animations,
232 | completion:completion)
233 |
234 |
235 | }
236 | }
237 |
238 | }
239 |
240 | internal class PresentationController: UIPresentationController, UIAdaptivePresentationControllerDelegate {
241 |
242 | var backgroundColor: UIColor!
243 |
244 | var margins = UIEdgeInsets.zero
245 |
246 | var sizeMax = CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude)
247 |
248 | var sizeMin = CGSize.zero
249 |
250 | var direction: UIRectEdge!
251 |
252 | var zTransitionSize: CGFloat?
253 |
254 | var blurEffectStyle: UIBlurEffectStyle?
255 |
256 | fileprivate var installedConstraint: [NSLayoutConstraint]?
257 |
258 | fileprivate var dimmingView: UIView! {
259 | didSet {
260 | dimmingView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(PresentationController.dimmingViewTapped(_:))))
261 | }
262 | }
263 |
264 | fileprivate var backView: UIView?
265 |
266 | fileprivate var snapshotView: UIView?
267 |
268 | fileprivate var perspectiveTransform: CATransform3D?
269 |
270 | var enableDismissTouchOutBound:Bool = true
271 |
272 | @objc func dimmingViewTapped(_ gesture: UIGestureRecognizer) {
273 | if gesture.state == UIGestureRecognizerState.ended && enableDismissTouchOutBound {
274 | presentingViewController.dismiss(animated: true, completion: nil)
275 | }
276 | }
277 |
278 | internal override var frameOfPresentedViewInContainerView : CGRect {
279 | var presentedViewFrame = CGRect.zero
280 | if let containerBounds = containerView?.bounds {
281 | presentedViewFrame.size = size(forChildContentContainer: presentedViewController, withParentContainerSize: containerBounds.size)
282 | presentedViewFrame.origin = CGPoint(x: margins.left, y: margins.top)
283 | if direction.contains(.bottom) {
284 | presentedViewFrame.origin.y += (containerBounds.height - (margins.top + margins.bottom)) - presentedViewFrame.height
285 | }
286 | if direction.contains(.right) {
287 | presentedViewFrame.origin.x += (containerBounds.width - (margins.left + margins.right)) - presentedViewFrame.width
288 | }
289 | }
290 | return presentedViewFrame
291 | }
292 |
293 | internal override func size(forChildContentContainer container: UIContentContainer, withParentContainerSize parentSize: CGSize) -> CGSize {
294 | return CGSize(
295 | width: max(min(parentSize.width - (margins.left + margins.right) ,sizeMax.width),sizeMin.width),
296 | height: max(min(parentSize.height - (margins.top + margins.bottom) ,sizeMax.height),sizeMin.height)
297 | )
298 | }
299 |
300 | internal override func presentationTransitionWillBegin() {
301 | guard let containerView = containerView else {return}
302 |
303 | if let _ = blurEffectStyle {
304 | dimmingView = UIVisualEffectView(frame: containerView.bounds)
305 | }else{
306 | dimmingView = UIView(frame: containerView.bounds)
307 | dimmingView.backgroundColor = backgroundColor
308 | dimmingView.alpha = 0.0
309 | }
310 |
311 | containerView.insertSubview(dimmingView, at:1)
312 |
313 | if let zTransitionSize = zTransitionSize {
314 | let backView = UIView()
315 | backView.frame = containerView.bounds
316 |
317 | presentingViewController.view.clipsToBounds = true
318 | if let superView = presentingViewController.view.superview {
319 | presentingViewController.view.makeEdgesEqualTo(superView)
320 | }
321 |
322 | self.snapshotView = presentingViewController.view
323 |
324 | containerView.insertSubview(backView, belowSubview: dimmingView)
325 | self.backView = backView
326 |
327 | perspectiveTransform = CATransform3DIdentity
328 | perspectiveTransform?.m34 = 1.0/(-1000)
329 | perspectiveTransform = CATransform3DTranslate(perspectiveTransform!, 0, 0, -zTransitionSize)
330 | }
331 |
332 |
333 |
334 | if let coordinator = presentedViewController.transitionCoordinator {
335 | coordinator.animate(alongsideTransition: {
336 | (context:UIViewControllerTransitionCoordinatorContext) -> Void in
337 | if let blurView = self.dimmingView as? UIVisualEffectView , let blurEffect = self.blurEffectStyle {
338 | blurView.effect = UIBlurEffect(style: blurEffect)
339 | }else{
340 | self.dimmingView.alpha = 1.0
341 | }
342 | if let perspectiveTransform = self.perspectiveTransform {
343 | self.snapshotView?.layer.transform = perspectiveTransform
344 | }
345 | }, completion:nil)
346 | } else {
347 | dimmingView.alpha = 1.0
348 | if let perspectiveTransform = perspectiveTransform {
349 | snapshotView?.layer.transform = perspectiveTransform
350 | }
351 | }
352 | }
353 |
354 | internal override func dismissalTransitionWillBegin() {
355 |
356 | if let coordinator = presentedViewController.transitionCoordinator {
357 | if let snapshotView = snapshotView {
358 | coordinator.animateAlongsideTransition(in: snapshotView, animation: {transitionContext in
359 | self.snapshotView?.layer.transform = CATransform3DIdentity
360 | }, completion: { transitionContext in
361 | if transitionContext.isCancelled {
362 | if let perspectiveTransform = self.perspectiveTransform {
363 | self.snapshotView?.layer.transform = perspectiveTransform
364 | }
365 | }else{
366 | self.presentingViewController.view.removeInstalledConstraints()
367 | self.presentingViewController.view.translatesAutoresizingMaskIntoConstraints = true
368 | }
369 | })
370 | }
371 |
372 | coordinator.animate(alongsideTransition: {
373 | (context:UIViewControllerTransitionCoordinatorContext) -> Void in
374 | if let blurView = self.dimmingView as? UIVisualEffectView {
375 | blurView.effect = nil
376 | }else{
377 | self.dimmingView.alpha = 0.0
378 | }
379 | }, completion: { context in
380 | if context.isCancelled, let blurEffect = self.blurEffectStyle,
381 | let blurView = self.dimmingView as? UIVisualEffectView {
382 | blurView.effect = UIBlurEffect(style: blurEffect)
383 | }
384 | })
385 | } else {
386 | dimmingView.alpha = 0.0
387 | snapshotView?.layer.transform = CATransform3DIdentity
388 | }
389 | }
390 |
391 | internal override func containerViewWillLayoutSubviews() {
392 | guard let containerView = containerView else {return}
393 | dimmingView.frame = containerView.bounds
394 | presentedView?.frame = frameOfPresentedViewInContainerView
395 | }
396 |
397 | internal override var shouldPresentInFullscreen : Bool {
398 | return true
399 | }
400 |
401 | internal override var adaptivePresentationStyle : UIModalPresentationStyle {
402 | return UIModalPresentationStyle.fullScreen
403 | }
404 | }
405 |
406 |
--------------------------------------------------------------------------------
/EasyTransition/ExampleInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 2.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UIStatusBarStyle
34 | UIStatusBarStyleLightContent
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UISupportedInterfaceOrientations~ipad
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 | UIViewControllerBasedStatusBarAppearance
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/EasyTransition/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 2.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/EasyTransition/InfoPlist.strings:
--------------------------------------------------------------------------------
1 |
2 | "CFBundleDisplayName" = "EasyTransition";
3 |
4 | "CFBundleName" = "EasyTransition";
5 |
--------------------------------------------------------------------------------
/EasyTransition/UIView+Constraints.swift:
--------------------------------------------------------------------------------
1 | //Copyright (c) 2015 Prolific Interactive.
2 | //
3 | //Permission is hereby granted, free of charge, to any person obtaining a copy
4 | //of this software and associated documentation files (the "Software"), to deal
5 | //in the Software without restriction, including without limitation the rights
6 | //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | //copies of the Software, and to permit persons to whom the Software is
8 | //furnished to do so, subject to the following conditions:
9 | //
10 | //The above copyright notice and this permission notice shall be included in
11 | //all copies or substantial portions of the Software.
12 | //
13 | //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | //THE SOFTWARE.
20 |
21 |
22 | import UIKit
23 |
24 | private var installedConstraintsHandle: UInt8 = 0
25 |
26 | internal extension UIView
27 | {
28 | var installedConstraints: [NSLayoutConstraint]? {
29 | get {
30 | return objc_getAssociatedObject(self, &installedConstraintsHandle) as? [NSLayoutConstraint]
31 | } set {
32 | objc_setAssociatedObject(self, &installedConstraintsHandle, newValue, .OBJC_ASSOCIATION_RETAIN)
33 | }
34 | }
35 |
36 | func makeEdgesEqualTo(_ view: UIView)
37 | {
38 | self.translatesAutoresizingMaskIntoConstraints = false
39 | let topConstraint = NSLayoutConstraint(item: self,
40 | attribute: .top,
41 | relatedBy: .equal,
42 | toItem: view,
43 | attribute: .top,
44 | multiplier: 1.0,
45 | constant: 0.0)
46 |
47 | let bottomConstraint = NSLayoutConstraint(item: self,
48 | attribute: .bottom,
49 | relatedBy: .equal,
50 | toItem: view,
51 | attribute: .bottom,
52 | multiplier: 1.0,
53 | constant: 0.0)
54 |
55 | let leadingConstraint = NSLayoutConstraint(item: self,
56 | attribute: .leading,
57 | relatedBy: .equal,
58 | toItem: view,
59 | attribute: .leading,
60 | multiplier: 1.0,
61 | constant: 0.0)
62 |
63 | let trailingConstraint = NSLayoutConstraint(item: self,
64 | attribute: .trailing,
65 | relatedBy: .equal,
66 | toItem: view,
67 | attribute: .trailing,
68 | multiplier: 1.0,
69 | constant: 0.0)
70 |
71 | let constraints = [topConstraint, bottomConstraint, leadingConstraint, trailingConstraint]
72 | view.addConstraints(constraints)
73 |
74 | self.installedConstraints = constraints
75 | }
76 |
77 | func removeInstalledConstraints()
78 | {
79 | guard let constraints = self.installedConstraints else {
80 | return
81 | }
82 |
83 | NSLayoutConstraint.deactivate(constraints)
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/EasyTransition/ViewController.swift:
--------------------------------------------------------------------------------
1 | // The MIT License (MIT)
2 | //
3 | // Copyright (c) 2016 - present Nattawut Singhchai
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 | //
23 |
24 |
25 | import UIKit
26 |
27 | import EasyTransition
28 |
29 | class ViewController: UIViewController {
30 |
31 | var transition: EasyTransition?
32 |
33 | @IBOutlet var actionButtons: [UIButton]!
34 |
35 | @IBOutlet weak var backgroundImage: UIImageView!
36 |
37 | @IBOutlet weak var projectNameLabel: UILabel!
38 |
39 | var setImageWithAnimate: ((UIImage)->Void)!
40 |
41 | override func viewDidLoad() {
42 | super.viewDidLoad()
43 | // Do any additional setup after loading the view, typically from a nib.
44 |
45 | backgroundImage.registerMotionEffectWithDept(dept: 5)
46 | projectNameLabel.registerMotionEffectWithDept(dept: 30)
47 |
48 | for button in actionButtons {
49 | button.registerMotionEffectWithDept(dept: 10)
50 | }
51 |
52 | setImageWithAnimate = {
53 | self.backgroundImage.image = $0
54 | let transition = CATransition()
55 | transition.duration = 0.2
56 | transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
57 | transition.type = kCATransitionFade
58 | self.backgroundImage.layer.add(transition, forKey: nil)
59 | }
60 |
61 | }
62 |
63 | override func didReceiveMemoryWarning() {
64 | super.didReceiveMemoryWarning()
65 | // Dispose of any resources that can be recreated.
66 | }
67 |
68 |
69 | // Present from Edge
70 |
71 | @IBAction func showTop(sender: AnyObject) {
72 | let menuVC = storyboard!.instantiateViewController(withIdentifier: "menu") as! UINavigationController
73 | transition = EasyTransition(attachedViewController: menuVC)
74 | transition?.transitionDuration = 0.3
75 | transition?.direction = .top
76 | transition?.blurEffectStyle = .dark
77 | transition?.margins = UIEdgeInsets(top: 100, left: 20, bottom: 100, right: 20)
78 | if let firstVC = menuVC.viewControllers.first as? ExampleMenuViewController {
79 | firstVC.imageDidSelected = setImageWithAnimate
80 | }
81 | present(menuVC, animated: true, completion: nil)
82 | }
83 |
84 | @IBAction func showRight(sender: AnyObject) {
85 | let menuVC = storyboard!.instantiateViewController(withIdentifier: "menu") as! UINavigationController
86 | transition = EasyTransition(attachedViewController: menuVC)
87 | transition?.transitionDuration = 0.4
88 | transition?.direction = .right
89 | transition?.blurEffectStyle = .light
90 | transition?.margins = UIEdgeInsets(top: 0, left: 100, bottom: 0, right: 0)
91 | if let firstVC = menuVC.viewControllers.first as? ExampleMenuViewController {
92 | firstVC.imageDidSelected = setImageWithAnimate
93 | }
94 | present(menuVC, animated: true, completion: nil)
95 | }
96 |
97 | @IBAction func showBottom(sender: AnyObject) {
98 | let menuVC = storyboard!.instantiateViewController(withIdentifier: "menu") as! UINavigationController
99 | transition = EasyTransition(attachedViewController: menuVC)
100 | transition?.transitionDuration = 0.5
101 | transition?.direction = .bottom
102 | transition?.margins = UIEdgeInsets(top: 20, left: 20, bottom: 0, right: 20)
103 | transition?.sizeMax = CGSize(width: CGFloat.greatestFiniteMagnitude, height: 200)
104 | if let firstVC = menuVC.viewControllers.first as? ExampleMenuViewController {
105 | firstVC.imageDidSelected = setImageWithAnimate
106 | }
107 | present(menuVC, animated: true, completion: nil)
108 | }
109 |
110 | @IBAction func showLeft(sender: AnyObject) {
111 | let menuVC = storyboard!.instantiateViewController(withIdentifier: "menu") as! UINavigationController
112 | transition = EasyTransition(attachedViewController: menuVC)
113 | transition?.transitionDuration = 0.4
114 | transition?.direction = .left
115 | transition?.margins = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 20)
116 | transition?.sizeMax = CGSize(width: 250, height: CGFloat.greatestFiniteMagnitude)
117 | transition?.zTransitionSize = 60
118 | transition?.backgroundColor = UIColor.black.withAlphaComponent(0.4)
119 | if let firstVC = menuVC.viewControllers.first as? ExampleMenuViewController {
120 | firstVC.imageDidSelected = setImageWithAnimate
121 | }
122 | present(menuVC, animated: true, completion: nil)
123 | }
124 |
125 | // Present from Corner
126 |
127 | @IBAction func showTopRight(sender: AnyObject) {
128 | let menuVC = storyboard!.instantiateViewController(withIdentifier: "close")
129 | transition = EasyTransition(attachedViewController: menuVC)
130 | transition?.transitionDuration = 0.6
131 | transition?.direction = [.top,.right]
132 | transition?.margins = UIEdgeInsets(top: 20, left: 0, bottom: 0, right: 20)
133 | transition?.sizeMax = CGSize(width: 200, height: 200)
134 | transition?.backgroundColor = UIColor(patternImage: UIImage(named: "pink_rice")!)
135 | present(menuVC, animated: true, completion: nil)
136 | }
137 |
138 | @IBAction func showBottomRight(sender: AnyObject) {
139 | let menuVC = storyboard!.instantiateViewController(withIdentifier: "close")
140 | transition = EasyTransition(attachedViewController: menuVC)
141 | transition?.transitionDuration = 0.4
142 | transition?.direction = [.bottom,.right]
143 | transition?.margins = UIEdgeInsets(top: 0, left: 0, bottom: 20, right: 20)
144 | transition?.sizeMax = CGSize(width: 200, height: 200)
145 | transition?.backgroundColor = UIColor.red.withAlphaComponent(0.5)
146 | present(menuVC, animated: true, completion: nil)
147 | }
148 |
149 | @IBAction func showBottomLeft(sender: AnyObject) {
150 | let menuVC = storyboard!.instantiateViewController(withIdentifier: "close")
151 | transition = EasyTransition(attachedViewController: menuVC)
152 | transition?.transitionDuration = 0.5
153 | transition?.direction = [.bottom,.left]
154 | transition?.margins = UIEdgeInsets(top: 0, left: 20, bottom: 20, right: 0)
155 | transition?.sizeMax = CGSize(width: 200, height: 200)
156 | transition?.backgroundColor = UIColor.white.withAlphaComponent(0.6)
157 | present(menuVC, animated: true, completion: nil)
158 | }
159 |
160 | @IBAction func showTopLeft(sender: AnyObject) {
161 | let menuVC = storyboard!.instantiateViewController(withIdentifier: "close")
162 | transition = EasyTransition(attachedViewController: menuVC)
163 | transition?.transitionDuration = 1
164 | transition?.direction = [.top,.left]
165 | transition?.margins = UIEdgeInsets(top: 20, left: 20, bottom: 0, right: 0)
166 | transition?.sizeMax = CGSize(width: 200, height: 200)
167 | transition?.backgroundColor = UIColor.purple.withAlphaComponent(0.4)
168 | present(menuVC, animated: true, completion: nil)
169 | }
170 |
171 | }
172 |
173 | extension UIView {
174 | func registerMotionEffectWithDept(dept:CGFloat) {
175 | let effectX = UIInterpolatingMotionEffect(keyPath: "center.x", type: .tiltAlongHorizontalAxis)
176 | let effectY = UIInterpolatingMotionEffect(keyPath: "center.y", type: .tiltAlongVerticalAxis)
177 | effectX.maximumRelativeValue = dept
178 | effectX.minimumRelativeValue = -dept
179 | effectY.maximumRelativeValue = dept
180 | effectY.minimumRelativeValue = -dept
181 |
182 | self.addMotionEffect(effectX)
183 | self.addMotionEffect(effectY)
184 | }
185 | }
186 |
187 | // Sample target View Controller
188 |
189 | class ExampleMenuViewController: UITableViewController {
190 |
191 | var imageDidSelected: ((UIImage)->Void)?
192 |
193 | @IBAction func dismiss(sender: AnyObject?) {
194 | guard let imageDidSelected = imageDidSelected,let sender = sender as? UITableViewCell else {
195 | dismiss(animated: true, completion: nil)
196 | return
197 | }
198 | guard let indexPath = tableView.indexPath(for: sender) else {
199 | dismiss(animated: true, completion: nil)
200 | return
201 | }
202 |
203 | let imageIndex = (indexPath.section * 4) + indexPath.row + 1
204 |
205 | dismiss(animated: true) { () -> Void in
206 | imageDidSelected(UIImage(named: "bg\(imageIndex)")!)
207 | }
208 | }
209 |
210 | override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
211 | dismiss(sender: tableView.cellForRow(at: indexPath))
212 | }
213 | }
214 |
215 | class ExampleViewController: UIViewController {
216 |
217 | override func viewDidLoad() {
218 | super.viewDidLoad()
219 | view.layer.cornerRadius = 100
220 | view.layer.masksToBounds = true
221 | }
222 |
223 | @IBAction func dismiss(sender: AnyObject?) {
224 | dismiss(animated: true, completion: nil)
225 | }
226 | }
227 |
228 |
--------------------------------------------------------------------------------
/EasyTransitionExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 901640D01C43AAE900921C9F /* ExampleInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 901640CF1C43AAE900921C9F /* ExampleInfo.plist */; };
11 | 901640D21C43AB7300921C9F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90A1B0511C42720D00D80957 /* ViewController.swift */; };
12 | 903C93E61C4F73B400EE99C5 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 903C93E51C4F73B400EE99C5 /* InfoPlist.strings */; };
13 | 906AE08F1C50C5DA00BE6BE0 /* UIView+Constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 906AE08E1C50C5DA00BE6BE0 /* UIView+Constraints.swift */; };
14 | 909E7A0A1C4E79B300DAD6B7 /* EasyTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90A1B0611C42723500D80957 /* EasyTransition.swift */; };
15 | 909E7A0B1C4E7ABB00DAD6B7 /* EasyTransition.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90A1B0861C42AE0200D80957 /* EasyTransition.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
16 | 909E7A0C1C4E7ABB00DAD6B7 /* EasyTransition.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 90A1B0861C42AE0200D80957 /* EasyTransition.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 90A1B0501C42720D00D80957 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90A1B04F1C42720D00D80957 /* AppDelegate.swift */; };
18 | 90A1B0551C42720D00D80957 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 90A1B0531C42720D00D80957 /* Main.storyboard */; };
19 | 90A1B0571C42720D00D80957 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 90A1B0561C42720D00D80957 /* Assets.xcassets */; };
20 | 90A1B05A1C42720D00D80957 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 90A1B0581C42720D00D80957 /* LaunchScreen.storyboard */; };
21 | 90A1B0891C42AE0200D80957 /* EasyTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 90A1B0881C42AE0200D80957 /* EasyTransition.h */; settings = {ATTRIBUTES = (Public, ); }; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXContainerItemProxy section */
25 | 909E7A0D1C4E7ABB00DAD6B7 /* PBXContainerItemProxy */ = {
26 | isa = PBXContainerItemProxy;
27 | containerPortal = 90A1B0441C42720D00D80957 /* Project object */;
28 | proxyType = 1;
29 | remoteGlobalIDString = 90A1B0851C42AE0200D80957;
30 | remoteInfo = EasyTransition;
31 | };
32 | /* End PBXContainerItemProxy section */
33 |
34 | /* Begin PBXCopyFilesBuildPhase section */
35 | 909E7A0F1C4E7ABB00DAD6B7 /* Embed Frameworks */ = {
36 | isa = PBXCopyFilesBuildPhase;
37 | buildActionMask = 2147483647;
38 | dstPath = "";
39 | dstSubfolderSpec = 10;
40 | files = (
41 | 909E7A0C1C4E7ABB00DAD6B7 /* EasyTransition.framework in Embed Frameworks */,
42 | );
43 | name = "Embed Frameworks";
44 | runOnlyForDeploymentPostprocessing = 0;
45 | };
46 | /* End PBXCopyFilesBuildPhase section */
47 |
48 | /* Begin PBXFileReference section */
49 | 901640CF1C43AAE900921C9F /* ExampleInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = ExampleInfo.plist; sourceTree = ""; };
50 | 903C93E51C4F73B400EE99C5 /* InfoPlist.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = InfoPlist.strings; sourceTree = ""; };
51 | 906AE08E1C50C5DA00BE6BE0 /* UIView+Constraints.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Constraints.swift"; sourceTree = ""; };
52 | 90A1B04C1C42720D00D80957 /* EasyTransitionExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EasyTransitionExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
53 | 90A1B04F1C42720D00D80957 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
54 | 90A1B0511C42720D00D80957 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
55 | 90A1B0541C42720D00D80957 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
56 | 90A1B0561C42720D00D80957 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
57 | 90A1B0591C42720D00D80957 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
58 | 90A1B0611C42723500D80957 /* EasyTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EasyTransition.swift; sourceTree = ""; };
59 | 90A1B0861C42AE0200D80957 /* EasyTransition.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = EasyTransition.framework; sourceTree = BUILT_PRODUCTS_DIR; };
60 | 90A1B0881C42AE0200D80957 /* EasyTransition.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EasyTransition.h; sourceTree = ""; };
61 | 90A1B08A1C42AE0200D80957 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
62 | /* End PBXFileReference section */
63 |
64 | /* Begin PBXFrameworksBuildPhase section */
65 | 90A1B0491C42720D00D80957 /* Frameworks */ = {
66 | isa = PBXFrameworksBuildPhase;
67 | buildActionMask = 2147483647;
68 | files = (
69 | 909E7A0B1C4E7ABB00DAD6B7 /* EasyTransition.framework in Frameworks */,
70 | );
71 | runOnlyForDeploymentPostprocessing = 0;
72 | };
73 | 90A1B0821C42AE0200D80957 /* Frameworks */ = {
74 | isa = PBXFrameworksBuildPhase;
75 | buildActionMask = 2147483647;
76 | files = (
77 | );
78 | runOnlyForDeploymentPostprocessing = 0;
79 | };
80 | /* End PBXFrameworksBuildPhase section */
81 |
82 | /* Begin PBXGroup section */
83 | 90A1B0431C42720D00D80957 = {
84 | isa = PBXGroup;
85 | children = (
86 | 90A1B04E1C42720D00D80957 /* EasyTransitionExample */,
87 | 90A1B0871C42AE0200D80957 /* EasyTransition */,
88 | 90A1B04D1C42720D00D80957 /* Products */,
89 | );
90 | sourceTree = "";
91 | };
92 | 90A1B04D1C42720D00D80957 /* Products */ = {
93 | isa = PBXGroup;
94 | children = (
95 | 90A1B04C1C42720D00D80957 /* EasyTransitionExample.app */,
96 | 90A1B0861C42AE0200D80957 /* EasyTransition.framework */,
97 | );
98 | name = Products;
99 | sourceTree = "";
100 | };
101 | 90A1B04E1C42720D00D80957 /* EasyTransitionExample */ = {
102 | isa = PBXGroup;
103 | children = (
104 | 90A1B04F1C42720D00D80957 /* AppDelegate.swift */,
105 | 90A1B0511C42720D00D80957 /* ViewController.swift */,
106 | 90A1B0531C42720D00D80957 /* Main.storyboard */,
107 | 90A1B0561C42720D00D80957 /* Assets.xcassets */,
108 | 90A1B0581C42720D00D80957 /* LaunchScreen.storyboard */,
109 | 903C93E51C4F73B400EE99C5 /* InfoPlist.strings */,
110 | 901640CF1C43AAE900921C9F /* ExampleInfo.plist */,
111 | );
112 | name = EasyTransitionExample;
113 | path = EasyTransition;
114 | sourceTree = "";
115 | };
116 | 90A1B0871C42AE0200D80957 /* EasyTransition */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 906AE08E1C50C5DA00BE6BE0 /* UIView+Constraints.swift */,
120 | 90A1B0611C42723500D80957 /* EasyTransition.swift */,
121 | 90A1B0881C42AE0200D80957 /* EasyTransition.h */,
122 | 90A1B08A1C42AE0200D80957 /* Info.plist */,
123 | );
124 | path = EasyTransition;
125 | sourceTree = "";
126 | };
127 | /* End PBXGroup section */
128 |
129 | /* Begin PBXHeadersBuildPhase section */
130 | 90A1B0831C42AE0200D80957 /* Headers */ = {
131 | isa = PBXHeadersBuildPhase;
132 | buildActionMask = 2147483647;
133 | files = (
134 | 90A1B0891C42AE0200D80957 /* EasyTransition.h in Headers */,
135 | );
136 | runOnlyForDeploymentPostprocessing = 0;
137 | };
138 | /* End PBXHeadersBuildPhase section */
139 |
140 | /* Begin PBXNativeTarget section */
141 | 90A1B04B1C42720D00D80957 /* EasyTransitionExample */ = {
142 | isa = PBXNativeTarget;
143 | buildConfigurationList = 90A1B05E1C42720D00D80957 /* Build configuration list for PBXNativeTarget "EasyTransitionExample" */;
144 | buildPhases = (
145 | 90A1B0481C42720D00D80957 /* Sources */,
146 | 90A1B0491C42720D00D80957 /* Frameworks */,
147 | 90A1B04A1C42720D00D80957 /* Resources */,
148 | 909E7A0F1C4E7ABB00DAD6B7 /* Embed Frameworks */,
149 | );
150 | buildRules = (
151 | );
152 | dependencies = (
153 | 909E7A0E1C4E7ABB00DAD6B7 /* PBXTargetDependency */,
154 | );
155 | name = EasyTransitionExample;
156 | productName = EasyTransition;
157 | productReference = 90A1B04C1C42720D00D80957 /* EasyTransitionExample.app */;
158 | productType = "com.apple.product-type.application";
159 | };
160 | 90A1B0851C42AE0200D80957 /* EasyTransition */ = {
161 | isa = PBXNativeTarget;
162 | buildConfigurationList = 90A1B08F1C42AE0200D80957 /* Build configuration list for PBXNativeTarget "EasyTransition" */;
163 | buildPhases = (
164 | 90A1B0811C42AE0200D80957 /* Sources */,
165 | 90A1B0821C42AE0200D80957 /* Frameworks */,
166 | 90A1B0831C42AE0200D80957 /* Headers */,
167 | 90A1B0841C42AE0200D80957 /* Resources */,
168 | );
169 | buildRules = (
170 | );
171 | dependencies = (
172 | );
173 | name = EasyTransition;
174 | productName = EasyTransition;
175 | productReference = 90A1B0861C42AE0200D80957 /* EasyTransition.framework */;
176 | productType = "com.apple.product-type.framework";
177 | };
178 | /* End PBXNativeTarget section */
179 |
180 | /* Begin PBXProject section */
181 | 90A1B0441C42720D00D80957 /* Project object */ = {
182 | isa = PBXProject;
183 | attributes = {
184 | LastSwiftUpdateCheck = 0720;
185 | LastUpgradeCheck = 0930;
186 | ORGANIZATIONNAME = "Nattawut Singhchai";
187 | TargetAttributes = {
188 | 90A1B04B1C42720D00D80957 = {
189 | CreatedOnToolsVersion = 7.2;
190 | DevelopmentTeam = 7J5JZ3G2QB;
191 | LastSwiftMigration = 0930;
192 | };
193 | 90A1B0851C42AE0200D80957 = {
194 | CreatedOnToolsVersion = 7.2;
195 | LastSwiftMigration = 0930;
196 | };
197 | };
198 | };
199 | buildConfigurationList = 90A1B0471C42720D00D80957 /* Build configuration list for PBXProject "EasyTransitionExample" */;
200 | compatibilityVersion = "Xcode 3.2";
201 | developmentRegion = English;
202 | hasScannedForEncodings = 0;
203 | knownRegions = (
204 | en,
205 | Base,
206 | );
207 | mainGroup = 90A1B0431C42720D00D80957;
208 | productRefGroup = 90A1B04D1C42720D00D80957 /* Products */;
209 | projectDirPath = "";
210 | projectRoot = "";
211 | targets = (
212 | 90A1B04B1C42720D00D80957 /* EasyTransitionExample */,
213 | 90A1B0851C42AE0200D80957 /* EasyTransition */,
214 | );
215 | };
216 | /* End PBXProject section */
217 |
218 | /* Begin PBXResourcesBuildPhase section */
219 | 90A1B04A1C42720D00D80957 /* Resources */ = {
220 | isa = PBXResourcesBuildPhase;
221 | buildActionMask = 2147483647;
222 | files = (
223 | 90A1B05A1C42720D00D80957 /* LaunchScreen.storyboard in Resources */,
224 | 903C93E61C4F73B400EE99C5 /* InfoPlist.strings in Resources */,
225 | 90A1B0571C42720D00D80957 /* Assets.xcassets in Resources */,
226 | 90A1B0551C42720D00D80957 /* Main.storyboard in Resources */,
227 | );
228 | runOnlyForDeploymentPostprocessing = 0;
229 | };
230 | 90A1B0841C42AE0200D80957 /* Resources */ = {
231 | isa = PBXResourcesBuildPhase;
232 | buildActionMask = 2147483647;
233 | files = (
234 | 901640D01C43AAE900921C9F /* ExampleInfo.plist in Resources */,
235 | );
236 | runOnlyForDeploymentPostprocessing = 0;
237 | };
238 | /* End PBXResourcesBuildPhase section */
239 |
240 | /* Begin PBXSourcesBuildPhase section */
241 | 90A1B0481C42720D00D80957 /* Sources */ = {
242 | isa = PBXSourcesBuildPhase;
243 | buildActionMask = 2147483647;
244 | files = (
245 | 901640D21C43AB7300921C9F /* ViewController.swift in Sources */,
246 | 90A1B0501C42720D00D80957 /* AppDelegate.swift in Sources */,
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | };
250 | 90A1B0811C42AE0200D80957 /* Sources */ = {
251 | isa = PBXSourcesBuildPhase;
252 | buildActionMask = 2147483647;
253 | files = (
254 | 909E7A0A1C4E79B300DAD6B7 /* EasyTransition.swift in Sources */,
255 | 906AE08F1C50C5DA00BE6BE0 /* UIView+Constraints.swift in Sources */,
256 | );
257 | runOnlyForDeploymentPostprocessing = 0;
258 | };
259 | /* End PBXSourcesBuildPhase section */
260 |
261 | /* Begin PBXTargetDependency section */
262 | 909E7A0E1C4E7ABB00DAD6B7 /* PBXTargetDependency */ = {
263 | isa = PBXTargetDependency;
264 | target = 90A1B0851C42AE0200D80957 /* EasyTransition */;
265 | targetProxy = 909E7A0D1C4E7ABB00DAD6B7 /* PBXContainerItemProxy */;
266 | };
267 | /* End PBXTargetDependency section */
268 |
269 | /* Begin PBXVariantGroup section */
270 | 90A1B0531C42720D00D80957 /* Main.storyboard */ = {
271 | isa = PBXVariantGroup;
272 | children = (
273 | 90A1B0541C42720D00D80957 /* Base */,
274 | );
275 | name = Main.storyboard;
276 | sourceTree = "";
277 | };
278 | 90A1B0581C42720D00D80957 /* LaunchScreen.storyboard */ = {
279 | isa = PBXVariantGroup;
280 | children = (
281 | 90A1B0591C42720D00D80957 /* Base */,
282 | );
283 | name = LaunchScreen.storyboard;
284 | sourceTree = "";
285 | };
286 | /* End PBXVariantGroup section */
287 |
288 | /* Begin XCBuildConfiguration section */
289 | 90A1B05C1C42720D00D80957 /* Debug */ = {
290 | isa = XCBuildConfiguration;
291 | buildSettings = {
292 | ALWAYS_SEARCH_USER_PATHS = NO;
293 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
294 | CLANG_CXX_LIBRARY = "libc++";
295 | CLANG_ENABLE_MODULES = YES;
296 | CLANG_ENABLE_OBJC_ARC = YES;
297 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
298 | CLANG_WARN_BOOL_CONVERSION = YES;
299 | CLANG_WARN_COMMA = YES;
300 | CLANG_WARN_CONSTANT_CONVERSION = YES;
301 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
302 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
303 | CLANG_WARN_EMPTY_BODY = YES;
304 | CLANG_WARN_ENUM_CONVERSION = YES;
305 | CLANG_WARN_INFINITE_RECURSION = YES;
306 | CLANG_WARN_INT_CONVERSION = YES;
307 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
308 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
309 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
310 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
311 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
312 | CLANG_WARN_STRICT_PROTOTYPES = YES;
313 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
314 | CLANG_WARN_UNREACHABLE_CODE = YES;
315 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
316 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
317 | COPY_PHASE_STRIP = NO;
318 | DEBUG_INFORMATION_FORMAT = dwarf;
319 | ENABLE_STRICT_OBJC_MSGSEND = YES;
320 | ENABLE_TESTABILITY = YES;
321 | GCC_C_LANGUAGE_STANDARD = gnu99;
322 | GCC_DYNAMIC_NO_PIC = NO;
323 | GCC_NO_COMMON_BLOCKS = YES;
324 | GCC_OPTIMIZATION_LEVEL = 0;
325 | GCC_PREPROCESSOR_DEFINITIONS = (
326 | "DEBUG=1",
327 | "$(inherited)",
328 | );
329 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
330 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
331 | GCC_WARN_UNDECLARED_SELECTOR = YES;
332 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
333 | GCC_WARN_UNUSED_FUNCTION = YES;
334 | GCC_WARN_UNUSED_VARIABLE = YES;
335 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
336 | MTL_ENABLE_DEBUG_INFO = YES;
337 | ONLY_ACTIVE_ARCH = YES;
338 | SDKROOT = iphoneos;
339 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
340 | TARGETED_DEVICE_FAMILY = "1,2";
341 | };
342 | name = Debug;
343 | };
344 | 90A1B05D1C42720D00D80957 /* Release */ = {
345 | isa = XCBuildConfiguration;
346 | buildSettings = {
347 | ALWAYS_SEARCH_USER_PATHS = NO;
348 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
349 | CLANG_CXX_LIBRARY = "libc++";
350 | CLANG_ENABLE_MODULES = YES;
351 | CLANG_ENABLE_OBJC_ARC = YES;
352 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
353 | CLANG_WARN_BOOL_CONVERSION = YES;
354 | CLANG_WARN_COMMA = YES;
355 | CLANG_WARN_CONSTANT_CONVERSION = YES;
356 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
357 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
358 | CLANG_WARN_EMPTY_BODY = YES;
359 | CLANG_WARN_ENUM_CONVERSION = YES;
360 | CLANG_WARN_INFINITE_RECURSION = YES;
361 | CLANG_WARN_INT_CONVERSION = YES;
362 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
363 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
364 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
365 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
366 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
367 | CLANG_WARN_STRICT_PROTOTYPES = YES;
368 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
369 | CLANG_WARN_UNREACHABLE_CODE = YES;
370 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
371 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
372 | COPY_PHASE_STRIP = NO;
373 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
374 | ENABLE_NS_ASSERTIONS = NO;
375 | ENABLE_STRICT_OBJC_MSGSEND = YES;
376 | GCC_C_LANGUAGE_STANDARD = gnu99;
377 | GCC_NO_COMMON_BLOCKS = YES;
378 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
379 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
380 | GCC_WARN_UNDECLARED_SELECTOR = YES;
381 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
382 | GCC_WARN_UNUSED_FUNCTION = YES;
383 | GCC_WARN_UNUSED_VARIABLE = YES;
384 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
385 | MTL_ENABLE_DEBUG_INFO = NO;
386 | SDKROOT = iphoneos;
387 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
388 | TARGETED_DEVICE_FAMILY = "1,2";
389 | VALIDATE_PRODUCT = YES;
390 | };
391 | name = Release;
392 | };
393 | 90A1B05F1C42720D00D80957 /* Debug */ = {
394 | isa = XCBuildConfiguration;
395 | buildSettings = {
396 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
397 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
398 | DEVELOPMENT_TEAM = 7J5JZ3G2QB;
399 | INFOPLIST_FILE = EasyTransition/ExampleInfo.plist;
400 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
401 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
402 | PRODUCT_BUNDLE_IDENTIFIER = indevizible.EasyTransitionExample;
403 | PRODUCT_NAME = EasyTransitionExample;
404 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
405 | SWIFT_VERSION = 4.0;
406 | };
407 | name = Debug;
408 | };
409 | 90A1B0601C42720D00D80957 /* Release */ = {
410 | isa = XCBuildConfiguration;
411 | buildSettings = {
412 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
413 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
414 | DEVELOPMENT_TEAM = 7J5JZ3G2QB;
415 | INFOPLIST_FILE = EasyTransition/ExampleInfo.plist;
416 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
418 | PRODUCT_BUNDLE_IDENTIFIER = indevizible.EasyTransitionExample;
419 | PRODUCT_NAME = EasyTransitionExample;
420 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
421 | SWIFT_VERSION = 4.0;
422 | };
423 | name = Release;
424 | };
425 | 90A1B0901C42AE0200D80957 /* Debug */ = {
426 | isa = XCBuildConfiguration;
427 | buildSettings = {
428 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
429 | CURRENT_PROJECT_VERSION = 1;
430 | DEFINES_MODULE = YES;
431 | DYLIB_COMPATIBILITY_VERSION = 1;
432 | DYLIB_CURRENT_VERSION = 1;
433 | DYLIB_INSTALL_NAME_BASE = "@rpath";
434 | INFOPLIST_FILE = EasyTransition/Info.plist;
435 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
436 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
437 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
438 | PRODUCT_BUNDLE_IDENTIFIER = indevizible.EasyTransition;
439 | PRODUCT_NAME = "$(TARGET_NAME)";
440 | SKIP_INSTALL = YES;
441 | SWIFT_SWIFT3_OBJC_INFERENCE = Default;
442 | SWIFT_VERSION = 4.0;
443 | VERSIONING_SYSTEM = "apple-generic";
444 | VERSION_INFO_PREFIX = "";
445 | };
446 | name = Debug;
447 | };
448 | 90A1B0911C42AE0200D80957 /* Release */ = {
449 | isa = XCBuildConfiguration;
450 | buildSettings = {
451 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
452 | CURRENT_PROJECT_VERSION = 1;
453 | DEFINES_MODULE = YES;
454 | DYLIB_COMPATIBILITY_VERSION = 1;
455 | DYLIB_CURRENT_VERSION = 1;
456 | DYLIB_INSTALL_NAME_BASE = "@rpath";
457 | INFOPLIST_FILE = EasyTransition/Info.plist;
458 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
459 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
460 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
461 | PRODUCT_BUNDLE_IDENTIFIER = indevizible.EasyTransition;
462 | PRODUCT_NAME = "$(TARGET_NAME)";
463 | SKIP_INSTALL = YES;
464 | SWIFT_SWIFT3_OBJC_INFERENCE = Default;
465 | SWIFT_VERSION = 4.0;
466 | VERSIONING_SYSTEM = "apple-generic";
467 | VERSION_INFO_PREFIX = "";
468 | };
469 | name = Release;
470 | };
471 | /* End XCBuildConfiguration section */
472 |
473 | /* Begin XCConfigurationList section */
474 | 90A1B0471C42720D00D80957 /* Build configuration list for PBXProject "EasyTransitionExample" */ = {
475 | isa = XCConfigurationList;
476 | buildConfigurations = (
477 | 90A1B05C1C42720D00D80957 /* Debug */,
478 | 90A1B05D1C42720D00D80957 /* Release */,
479 | );
480 | defaultConfigurationIsVisible = 0;
481 | defaultConfigurationName = Release;
482 | };
483 | 90A1B05E1C42720D00D80957 /* Build configuration list for PBXNativeTarget "EasyTransitionExample" */ = {
484 | isa = XCConfigurationList;
485 | buildConfigurations = (
486 | 90A1B05F1C42720D00D80957 /* Debug */,
487 | 90A1B0601C42720D00D80957 /* Release */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | 90A1B08F1C42AE0200D80957 /* Build configuration list for PBXNativeTarget "EasyTransition" */ = {
493 | isa = XCConfigurationList;
494 | buildConfigurations = (
495 | 90A1B0901C42AE0200D80957 /* Debug */,
496 | 90A1B0911C42AE0200D80957 /* Release */,
497 | );
498 | defaultConfigurationIsVisible = 0;
499 | defaultConfigurationName = Release;
500 | };
501 | /* End XCConfigurationList section */
502 | };
503 | rootObject = 90A1B0441C42720D00D80957 /* Project object */;
504 | }
505 |
--------------------------------------------------------------------------------
/EasyTransitionExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/EasyTransitionExample.xcodeproj/xcshareddata/xcschemes/EasyTransition.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
70 |
71 |
72 |
73 |
75 |
76 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/EasyTransitionExample.xcodeproj/xcshareddata/xcschemes/EasyTransitionExample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/EasyTransitionExample.xcodeproj/xcuserdata/indevizible.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/EasyTransitionExample.xcodeproj/xcuserdata/indevizible.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | EasyTransition.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 1
11 |
12 | EasyTransitionExample.xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 0
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | 90A1B04B1C42720D00D80957
21 |
22 | primary
23 |
24 |
25 | 90A1B0851C42AE0200D80957
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Nattawut Singhchai
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # EasyTransition
2 | [](https://travis-ci.org/indevizible/EasyTransition.svg?branch=master)
3 | [](https://img.shields.io/cocoapods/v/EasyTransition.svg)
4 | [](https://github.com/Carthage/Carthage)
5 | [](https://raw.githubusercontent.com/indevizible/EasyTransition/master/LICENSE)
6 | [](http://cocoadocs.org/docsets/EasyTransition)
7 | [](http://twitter.com/indevizible)
8 |
9 | EasyTransition is a simple library for make a transition in iOS.
10 |
11 | 
12 |
13 | [Live preview](https://appetize.io/app/jc8dgwd8rfhzxtna06e1b4bz9w)
14 |
15 | ## Features
16 | - [x] Transition from corners
17 | - [x] Interactive dismissal transition
18 | - [x] Scalable to background view controller
19 | - [x] Blur Effect
20 | - [ ] In-Out transition direction
21 |
22 | ## Limitation
23 |
24 | - This library can be compile with iOS 8.0+ but transition work on iOS 8.3+
25 |
26 | ## Requirements
27 | - Swift 2+ (use v.1.2)
28 | - Swift 3 (2.1)
29 | - iOS 8.3+
30 |
31 | ## Installation
32 | You can install this library in 2 ways
33 |
34 | ### Manually
35 |
36 | Copy [EasyTransition.swift](EasyTransition/EasyTransition.swift) and [UIView+Constraints.swift](EasyTransition/UIView+Constraints.swift) to your project and give me some beer.
37 |
38 | ### CocoaPods
39 |
40 | [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
41 |
42 | ```bash
43 | $ gem install cocoapods
44 | ```
45 |
46 | To integrate EasyTransition into your Xcode project using CocoaPods, specify it in your `Podfile`:
47 |
48 | ```ruby
49 | source 'https://github.com/CocoaPods/Specs.git'
50 | platform :ios, '8.0'
51 | use_frameworks!
52 |
53 | pod 'EasyTransition', '~> 2.1'
54 | ```
55 |
56 | Then, run the following command:
57 |
58 | ```bash
59 | $ pod install
60 | ```
61 |
62 | ### Carthage
63 |
64 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
65 |
66 | You can install Carthage with [Homebrew](http://brew.sh/) using the following command:
67 |
68 | ```bash
69 | $ brew update
70 | $ brew install carthage
71 | ```
72 |
73 | To integrate EasyTransition into your Xcode project using Carthage, specify it in your `Cartfile`:
74 |
75 | ```ogdl
76 | github "indevizible/EasyTransition" ~> 2.1
77 | ```
78 |
79 | Run `carthage update` to build the framework and drag the built `EasyTransition.framework` into your Xcode project.
80 |
81 | ## Usage
82 | Import and declare EasyTransition:
83 | ```swift
84 | import EasyTransition
85 |
86 | class ViewController: UIViewController {
87 | var transition: EasyTransition?
88 | }
89 | ```
90 | Customise transition and present normally:
91 |
92 | ```swift
93 | let vc = TargetViewController()
94 | transition = EasyTransition(attachedViewController: vc)
95 | transition?.transitionDuration = 0.4
96 | transition?.direction = .right
97 | transition?.margins = UIEdgeInsets(top: 0, left: 100, bottom: 0, right: 0)
98 | present(vc, animated: true, completion: nil)
99 | ```
100 | You can also make a direction from a corner:
101 | ```swift
102 | transition?.direction = [.top,.right]
103 | ```
104 | And more on EasyTransitionExample.xcodeproj
105 |
106 | ## Sources Used
107 | - www.subtlepatterns.com
108 | - www.unsplash.com
109 | - [Alamofire/Alamofire](https://github.com/Alamofire/Alamofire) for CocoaPods and Carthage description
110 | - [prolificinteractive/NavigationControllerBlurTransition](https://github.com/prolificinteractive/NavigationControllerBlurTransition) for [UIView+Constraints.swift](https://github.com/prolificinteractive/NavigationControllerBlurTransition/blob/master/Pod/Classes/UIView%2BConstraints.swift)
111 |
112 | ## Author
113 |
114 | Nattawut Singhchai, wut@indevizible.com
115 |
116 | ## License
117 |
118 | EasyTransition is available under the MIT license. See the [LICENSE file](LICENSE).
119 |
120 |
--------------------------------------------------------------------------------