├── Demo
├── mbmotion_actionsheet.gif
├── mbmotion_actionsheet_origin.gif
├── mbmotion_eyeloading.gif
├── mbmotion_eyeloading_origin.gif
└── mbmotion_hamburgbutton.gif
├── Example
├── MBMotion.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── MBMotion-Example.xcscheme
├── MBMotion.xcworkspace
│ └── contents.xcworkspacedata
├── MBMotion
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ └── LaunchScreen.xib
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── back_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── back_icon@2x.png
│ │ ├── book_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── book_icon@2x.png
│ │ ├── box_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── box_icon@2x.png
│ │ ├── calender_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── calender_icon@2x.png
│ │ ├── camera_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── camera_icon@2x.png
│ │ ├── clock_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── clock_icon@2x.png
│ │ ├── conver_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── conver_icon@2x.png
│ │ ├── head_image.imageset
│ │ │ ├── Contents.json
│ │ │ └── IMG_0492.PNG
│ │ ├── location_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── location_icon@2x.png
│ │ ├── lvshop_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── lvshop_icon@2x.png
│ │ ├── mail_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── mail_icon@2x.png
│ │ ├── paint_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── paint_icon@2x.png
│ │ ├── simon_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── simon_icon@2x.png
│ │ ├── trash_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── trash_icon@2x.png
│ │ ├── wechat.imageset
│ │ │ ├── Contents.json
│ │ │ └── wechat.jpg
│ │ ├── wheel_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── wheel_icon@2x.png
│ │ └── write_icon.imageset
│ │ │ ├── Contents.json
│ │ │ └── write_icon@2x.png
│ ├── Info.plist
│ ├── MBMotionActionSheetDemoViewController.swift
│ ├── MBMotionContentView.swift
│ ├── MBMotionContentView.xib
│ ├── MBMotionEyeLoadingViewController.swift
│ ├── MBMotionHamburgButtonViewController.swift
│ ├── MBMotionTableViewCellContentView.swift
│ ├── MBMotionTableViewCellContentView.xib
│ ├── MBMotionWebViewController.swift
│ ├── MBNavigationBar.swift
│ ├── MBNavigationItem.swift
│ ├── MBTableHeaderView.swift
│ ├── MBTableHeaderView.xib
│ ├── Main.storyboard
│ └── ViewController.swift
├── Podfile
├── Podfile.lock
├── Pods
│ ├── Local Podspecs
│ │ └── MBMotion.podspec.json
│ ├── Manifest.lock
│ ├── Pods.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcuserdata
│ │ │ └── mmoaay.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── MBMotion.xcscheme
│ │ │ ├── Pods-MBMotion_Example.xcscheme
│ │ │ ├── Pods-MBMotion_Tests.xcscheme
│ │ │ └── SnapKit.xcscheme
│ ├── SnapKit
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── Source
│ │ │ ├── Constraint.swift
│ │ │ ├── ConstraintAttributes.swift
│ │ │ ├── ConstraintConfig.swift
│ │ │ ├── ConstraintConstantTarget.swift
│ │ │ ├── ConstraintDSL.swift
│ │ │ ├── ConstraintDescription.swift
│ │ │ ├── ConstraintInsetTarget.swift
│ │ │ ├── ConstraintInsets.swift
│ │ │ ├── ConstraintItem.swift
│ │ │ ├── ConstraintLayoutGuide+Extensions.swift
│ │ │ ├── ConstraintLayoutGuide.swift
│ │ │ ├── ConstraintLayoutGuideDSL.swift
│ │ │ ├── ConstraintLayoutSupport.swift
│ │ │ ├── ConstraintLayoutSupportDSL.swift
│ │ │ ├── ConstraintMaker.swift
│ │ │ ├── ConstraintMakerEditable.swift
│ │ │ ├── ConstraintMakerExtendable.swift
│ │ │ ├── ConstraintMakerFinalizable.swift
│ │ │ ├── ConstraintMakerPriortizable.swift
│ │ │ ├── ConstraintMakerRelatable.swift
│ │ │ ├── ConstraintMultiplierTarget.swift
│ │ │ ├── ConstraintOffsetTarget.swift
│ │ │ ├── ConstraintPriorityTarget.swift
│ │ │ ├── ConstraintRelatableTarget.swift
│ │ │ ├── ConstraintRelation.swift
│ │ │ ├── ConstraintView+Extensions.swift
│ │ │ ├── ConstraintView.swift
│ │ │ ├── ConstraintViewDSL.swift
│ │ │ ├── Debugging.swift
│ │ │ ├── LayoutConstraint.swift
│ │ │ ├── LayoutConstraintItem.swift
│ │ │ └── UILayoutSupport+Extensions.swift
│ └── Target Support Files
│ │ ├── MBMotion
│ │ ├── Info.plist
│ │ ├── MBMotion-dummy.m
│ │ ├── MBMotion-prefix.pch
│ │ ├── MBMotion-umbrella.h
│ │ ├── MBMotion.modulemap
│ │ └── MBMotion.xcconfig
│ │ ├── Pods-MBMotion_Example
│ │ ├── Info.plist
│ │ ├── Pods-MBMotion_Example-acknowledgements.markdown
│ │ ├── Pods-MBMotion_Example-acknowledgements.plist
│ │ ├── Pods-MBMotion_Example-dummy.m
│ │ ├── Pods-MBMotion_Example-frameworks.sh
│ │ ├── Pods-MBMotion_Example-resources.sh
│ │ ├── Pods-MBMotion_Example-umbrella.h
│ │ ├── Pods-MBMotion_Example.debug.xcconfig
│ │ ├── Pods-MBMotion_Example.modulemap
│ │ └── Pods-MBMotion_Example.release.xcconfig
│ │ ├── Pods-MBMotion_Tests
│ │ ├── Info.plist
│ │ ├── Pods-MBMotion_Tests-acknowledgements.markdown
│ │ ├── Pods-MBMotion_Tests-acknowledgements.plist
│ │ ├── Pods-MBMotion_Tests-dummy.m
│ │ ├── Pods-MBMotion_Tests-frameworks.sh
│ │ ├── Pods-MBMotion_Tests-resources.sh
│ │ ├── Pods-MBMotion_Tests-umbrella.h
│ │ ├── Pods-MBMotion_Tests.debug.xcconfig
│ │ ├── Pods-MBMotion_Tests.modulemap
│ │ └── Pods-MBMotion_Tests.release.xcconfig
│ │ └── SnapKit
│ │ ├── Info.plist
│ │ ├── SnapKit-dummy.m
│ │ ├── SnapKit-prefix.pch
│ │ ├── SnapKit-umbrella.h
│ │ ├── SnapKit.modulemap
│ │ └── SnapKit.xcconfig
└── Tests
│ ├── Info.plist
│ └── Tests.swift
├── LICENSE
├── MBMotion.podspec
├── MBMotion
├── .DS_Store
├── Assets
│ ├── .gitkeep
│ ├── MBMotionActionSheet.xib
│ ├── MBMotionHamburgButton.xib
│ └── MBMotionTableViewCell.xib
└── Classes
│ ├── .gitkeep
│ ├── ActionSheet
│ └── MBMotionActionSheet.swift
│ ├── Cell
│ └── MBMotionTableViewCell.swift
│ ├── Extension
│ └── UIView+Frame.swift
│ ├── EyeLoading
│ └── MBEyeLoading.swift
│ └── HamburgButton
│ └── MBMotionHamburgButton.swift
├── README.md
└── _Pods.xcodeproj
/Demo/mbmotion_actionsheet.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Demo/mbmotion_actionsheet.gif
--------------------------------------------------------------------------------
/Demo/mbmotion_actionsheet_origin.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Demo/mbmotion_actionsheet_origin.gif
--------------------------------------------------------------------------------
/Demo/mbmotion_eyeloading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Demo/mbmotion_eyeloading.gif
--------------------------------------------------------------------------------
/Demo/mbmotion_eyeloading_origin.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Demo/mbmotion_eyeloading_origin.gif
--------------------------------------------------------------------------------
/Demo/mbmotion_hamburgbutton.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Demo/mbmotion_hamburgbutton.gif
--------------------------------------------------------------------------------
/Example/MBMotion.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/MBMotion.xcodeproj/xcshareddata/xcschemes/MBMotion-Example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
67 |
68 |
78 |
80 |
86 |
87 |
88 |
89 |
90 |
91 |
97 |
99 |
105 |
106 |
107 |
108 |
110 |
111 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/Example/MBMotion.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/MBMotion/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // MBMotion
4 | //
5 | // Created by ZhengYidong on 01/12/2017.
6 | // Copyright (c) 2017 ZhengYidong. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // 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.
24 | // 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.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // 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.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // 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.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // 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.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Example/MBMotion/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Example/MBMotion/Images.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 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | }
43 | ],
44 | "info" : {
45 | "version" : 1,
46 | "author" : "xcode"
47 | }
48 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/back_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "back_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/back_icon.imageset/back_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/back_icon.imageset/back_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/book_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "book_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/book_icon.imageset/book_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/book_icon.imageset/book_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/box_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "box_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/box_icon.imageset/box_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/box_icon.imageset/box_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/calender_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "calender_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/calender_icon.imageset/calender_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/calender_icon.imageset/calender_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/camera_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "camera_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/camera_icon.imageset/camera_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/camera_icon.imageset/camera_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/clock_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "clock_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/clock_icon.imageset/clock_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/clock_icon.imageset/clock_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/conver_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "conver_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/conver_icon.imageset/conver_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/conver_icon.imageset/conver_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/head_image.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "IMG_0492.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 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/head_image.imageset/IMG_0492.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/head_image.imageset/IMG_0492.PNG
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/location_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "location_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/location_icon.imageset/location_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/location_icon.imageset/location_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/lvshop_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "lvshop_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/lvshop_icon.imageset/lvshop_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/lvshop_icon.imageset/lvshop_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/mail_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "mail_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/mail_icon.imageset/mail_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/mail_icon.imageset/mail_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/paint_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "paint_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/paint_icon.imageset/paint_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/paint_icon.imageset/paint_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/simon_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "simon_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/simon_icon.imageset/simon_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/simon_icon.imageset/simon_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/trash_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "trash_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/trash_icon.imageset/trash_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/trash_icon.imageset/trash_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/wechat.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "wechat.jpg"
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 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/wechat.imageset/wechat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/wechat.imageset/wechat.jpg
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/wheel_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "wheel_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/wheel_icon.imageset/wheel_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/wheel_icon.imageset/wheel_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/write_icon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "write_icon@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/Example/MBMotion/Images.xcassets/write_icon.imageset/write_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/Example/MBMotion/Images.xcassets/write_icon.imageset/write_icon@2x.png
--------------------------------------------------------------------------------
/Example/MBMotion/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSAppTransportSecurity
6 |
7 | NSAllowsArbitraryLoads
8 |
9 | NSAllowsArbitraryLoadsInWebContent
10 |
11 |
12 | CFBundleDevelopmentRegion
13 | en
14 | CFBundleExecutable
15 | $(EXECUTABLE_NAME)
16 | CFBundleIdentifier
17 | $(PRODUCT_BUNDLE_IDENTIFIER)
18 | CFBundleInfoDictionaryVersion
19 | 6.0
20 | CFBundleName
21 | $(PRODUCT_NAME)
22 | CFBundlePackageType
23 | APPL
24 | CFBundleShortVersionString
25 | 1.0
26 | CFBundleSignature
27 | ????
28 | CFBundleVersion
29 | 1
30 | LSRequiresIPhoneOS
31 |
32 | UILaunchStoryboardName
33 | LaunchScreen
34 | UIMainStoryboardFile
35 | Main
36 | UIRequiredDeviceCapabilities
37 |
38 | armv7
39 |
40 | UISupportedInterfaceOrientations
41 |
42 | UIInterfaceOrientationPortrait
43 | UIInterfaceOrientationLandscapeLeft
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Example/MBMotion/MBMotionActionSheetDemoViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBMotionActionSheetDemoViewController.swift
3 | // MBMotion
4 | //
5 | // Created by Perry on 15/12/7.
6 | // Copyright © 2015年 MmoaaY. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import MBMotion
11 |
12 | class MBMotionActionSheetDemoViewController: UIViewController,MBMotionContentViewDelegate {
13 |
14 | var actionSheet:MBMotionActionSheet?
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 |
19 | // Do any additional setup after loading the view.
20 |
21 |
22 | }
23 |
24 | override func viewDidAppear(_ animated: Bool) {
25 | super.viewDidAppear(animated)
26 | let contentView = MBMotionContentView()
27 | self.actionSheet = MBMotionActionSheet(containerView: self.navigationController?.view, contentView: contentView.getContentView())
28 | contentView.delegate = self
29 | }
30 |
31 | override func viewWillDisappear(_ animated: Bool) {
32 | super.viewWillDisappear(animated)
33 | self.actionSheet?.removeActionSheet()
34 | }
35 |
36 | override func didReceiveMemoryWarning() {
37 | super.didReceiveMemoryWarning()
38 | // Dispose of any resources that can be recreated.
39 | }
40 |
41 | func switchButtonPressed(_ status:MBMotionHamburgButtonStatus) {
42 | if MBMotionHamburgButtonStatus.open == status {
43 | self.actionSheet?.expandActionSheet()
44 | } else {
45 | self.actionSheet?.collapseActionSheet()
46 | }
47 | }
48 | /*
49 | // MARK: - Navigation
50 |
51 | // In a storyboard-based application, you will often want to do a little preparation before navigation
52 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
53 | // Get the new view controller using segue.destinationViewController.
54 | // Pass the selected object to the new view controller.
55 | }
56 | */
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/Example/MBMotion/MBMotionEyeLoadingViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBMotionEyeLoadingViewController.swift
3 | // MBMotion
4 | //
5 | // Created by ZhengYidong on 12/01/2017.
6 | // Copyright © 2017 CocoaPods. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import MBMotion
11 | import SnapKit
12 |
13 | class MBMotionEyeLoadingViewController: UIViewController {
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 |
18 | // Do any additional setup after loading the view.
19 | let eye = MBEyeLoading()
20 | view.addSubview(eye)
21 |
22 | eye.snp.makeConstraints { (make:ConstraintMaker) in
23 | make.edges.equalTo(view)
24 | }
25 | }
26 |
27 | override func didReceiveMemoryWarning() {
28 | super.didReceiveMemoryWarning()
29 | // Dispose of any resources that can be recreated.
30 | }
31 |
32 |
33 | /*
34 | // MARK: - Navigation
35 |
36 | // In a storyboard-based application, you will often want to do a little preparation before navigation
37 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
38 | // Get the new view controller using segue.destinationViewController.
39 | // Pass the selected object to the new view controller.
40 | }
41 | */
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/Example/MBMotion/MBMotionHamburgButtonViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBMotionHamburgButtonViewController.swift
3 | // MBMotion
4 | //
5 | // Created by ZhengYidong on 13/01/2017.
6 | // Copyright © 2017 CocoaPods. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class MBMotionHamburgButtonViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | // Do any additional setup after loading the view.
17 | }
18 |
19 | override func didReceiveMemoryWarning() {
20 | super.didReceiveMemoryWarning()
21 | // Dispose of any resources that can be recreated.
22 | }
23 |
24 |
25 | /*
26 | // MARK: - Navigation
27 |
28 | // In a storyboard-based application, you will often want to do a little preparation before navigation
29 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
30 | // Get the new view controller using segue.destinationViewController.
31 | // Pass the selected object to the new view controller.
32 | }
33 | */
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/Example/MBMotion/MBMotionTableViewCellContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBMotionTableViewCellContentView.swift
3 | // MBMotion
4 | //
5 | // Created by ZhengYidong on 13/01/2017.
6 | // Copyright © 2017 CocoaPods. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SnapKit
11 |
12 | class MBMotionTableViewCellContentView: UIView {
13 |
14 | @IBOutlet var contentView: UIView!
15 |
16 | @IBOutlet var icon:UIImageView!
17 | @IBOutlet var title:UILabel!
18 |
19 | /*
20 | // Only override draw() if you perform custom drawing.
21 | // An empty implementation adversely affects performance during animation.
22 | override func draw(_ rect: CGRect) {
23 | // Drawing code
24 | }
25 | */
26 | init() {
27 | super.init(frame: CGRect.zero)
28 | Bundle(for: self.classForCoder).loadNibNamed("MBMotionTableViewCellContentView", owner: self, options: nil)
29 |
30 | self.addSubview(contentView)
31 | contentView.snp.makeConstraints { (make: ConstraintMaker) in
32 | make.edges.equalTo(self)
33 | }
34 | }
35 |
36 | required init?(coder aDecoder: NSCoder) {
37 | fatalError("init(coder:) has not been implemented")
38 | }
39 |
40 | func setContent(_ content:(imageName:String, title:String)) {
41 | self.title.text = content.title
42 | self.icon.image = UIImage(named: content.imageName)
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Example/MBMotion/MBMotionTableViewCellContentView.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Example/MBMotion/MBMotionWebViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBMotionWebViewController.swift
3 | // MBMotion
4 | //
5 | // Created by Perry on 15/12/7.
6 | // Copyright © 2015年 MmoaaY. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class MBMotionWebViewController: UIViewController {
12 |
13 | @IBOutlet var webView: UIWebView!
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | // Do any additional setup after loading the view.
18 | self.webView.loadRequest(URLRequest(url: URL(string: "http://swift.gg/")!))
19 | }
20 |
21 | override func didReceiveMemoryWarning() {
22 | super.didReceiveMemoryWarning()
23 | // Dispose of any resources that can be recreated.
24 | }
25 |
26 |
27 | /*
28 | // MARK: - Navigation
29 |
30 | // In a storyboard-based application, you will often want to do a little preparation before navigation
31 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
32 | // Get the new view controller using segue.destinationViewController.
33 | // Pass the selected object to the new view controller.
34 | }
35 | */
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/Example/MBMotion/MBNavigationBar.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBNavigationBar.swift
3 | // MBMotion
4 | //
5 | // Created by Perry on 15/12/9.
6 | // Copyright © 2015年 MmoaaY. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | enum MBNavigationBarStyle: Int {
12 | case `default`
13 | case futura
14 | }
15 |
16 | class MBNavigationBar: UINavigationBar {
17 |
18 | /*
19 | // Only override drawRect: if you perform custom drawing.
20 | // An empty implementation adversely affects performance during animation.
21 | override func drawRect(rect: CGRect) {
22 | // Drawing code
23 | }
24 | */
25 |
26 | required init?(coder aDecoder: NSCoder) {
27 | super.init(coder: aDecoder)
28 |
29 | self.backIndicatorImage = UIImage(named: "back_icon")
30 | self.backIndicatorTransitionMaskImage = UIImage(named: "back_icon")
31 |
32 | self.tintColor = UIColor(red: 42/255, green: 55/255, blue: 67/255, alpha: 1)
33 |
34 | let font = UIFont(name: "Futura", size: 18)
35 | if let _ = font {
36 | self.titleTextAttributes = [NSFontAttributeName:font!, NSForegroundColorAttributeName:UIColor(red: 42/255, green: 55/255, blue: 67/255, alpha: 1)]
37 | }
38 | }
39 |
40 | func setStyle(_ style:MBNavigationBarStyle) {
41 | switch style {
42 | case .futura:
43 | break;
44 | default:
45 | break;
46 | }
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/Example/MBMotion/MBNavigationItem.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBNavigationItem.swift
3 | // MBMotion
4 | //
5 | // Created by Perry on 15/12/9.
6 | // Copyright © 2015年 MmoaaY. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class MBNavigationItem: UINavigationItem {
12 |
13 | required init?(coder: NSCoder) {
14 | super.init(coder: coder)
15 |
16 | self.backBarButtonItem = UIBarButtonItem(title: "", style: UIBarButtonItemStyle.plain, target: nil, action: nil)
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/Example/MBMotion/MBTableHeaderView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBTableHeaderView.swift
3 | // MBPageControllerFromMomo
4 | //
5 | // Created by Perry on 15/7/3.
6 | // Copyright © 2015年 MmoaaY. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SnapKit
11 |
12 | protocol MBTableHeaderViewDelegate {
13 | func swiftGGPressed()
14 | }
15 |
16 | class MBTableHeaderView: UIView {
17 | @IBOutlet var contentView: UIView!
18 |
19 | var delegate:MBTableHeaderViewDelegate?
20 |
21 | override init(frame: CGRect) {
22 | super.init(frame: frame)
23 |
24 | Bundle(for: self.classForCoder).loadNibNamed("MBTableHeaderView", owner: self, options: nil)
25 |
26 | self.addSubview(self.contentView)
27 |
28 | self.contentView.snp.makeConstraints { (make) -> Void in
29 | make.edges.equalTo(self)
30 | }
31 | }
32 |
33 | required init?(coder aDecoder: NSCoder) {
34 | super.init(coder: aDecoder)
35 | }
36 |
37 | @IBAction func swiftGGPressed(_ sender: AnyObject) {
38 | self.delegate?.swiftGGPressed()
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Example/MBMotion/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // MBMotion
4 | //
5 | // Created by Perry on 15/9/7.
6 | // Copyright (c) 2015年 MmoaaY. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import MBMotion
11 |
12 | class ViewController: UIViewController,MBTableHeaderViewDelegate {
13 |
14 | @IBOutlet var tableView: UITableView!
15 |
16 | var items = ["MBMotionActionSheet", "MBEyeLoading", "MBMotionHamburgButton"]
17 | override func viewDidLoad() {
18 | super.viewDidLoad()
19 | // Do any additional setup after loading the view, typically from a nib.
20 | self.initTableView()
21 | }
22 |
23 | override func didReceiveMemoryWarning() {
24 | super.didReceiveMemoryWarning()
25 | // Dispose of any resources that can be recreated.
26 | }
27 |
28 | func swiftGGPressed() {
29 | self.performSegue(withIdentifier: "fromHomeToWeb", sender: nil)
30 | }
31 |
32 | func initTableView(){
33 | let tableHeaderView = MBTableHeaderView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.width))
34 | tableHeaderView.delegate = self
35 | self.tableView.tableHeaderView = tableHeaderView
36 | }
37 |
38 | func numberOfSectionsInTableView(_ tableView: UITableView) -> Int {
39 | // #warning Potentially incomplete method implementation.
40 | // Return the number of sections.
41 | return 1
42 | }
43 |
44 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
45 | // #warning Incomplete method implementation.
46 | // Return the number of rows in the section.
47 | return self.items.count
48 | }
49 |
50 | func tableView(_ tableView: UITableView, didSelectRowAtIndexPath indexPath: IndexPath) {
51 | self.performSegue(withIdentifier: "fromHomeTo"+self.items[indexPath.row], sender: nil)
52 | }
53 |
54 | func tableView(_ tableView: UITableView, cellForRowAtIndexPath indexPath: IndexPath) -> UITableViewCell {
55 | var cell:UITableViewCell? = tableView.dequeueReusableCell(withIdentifier: "ViewControllerTableViewCell")
56 | if cell == nil {
57 | cell = UITableViewCell(style: UITableViewCellStyle.default, reuseIdentifier: "ViewControllerTableViewCell")
58 | }
59 | cell?.selectionStyle = UITableViewCellSelectionStyle.none
60 | cell?.textLabel?.text = self.items[indexPath.row]
61 | cell?.textLabel?.font = UIFont(name: "Futura", size: 16)
62 | return cell!
63 | }
64 |
65 | }
66 |
67 |
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | target 'MBMotion_Example' do
4 | pod 'MBMotion', :path => '../'
5 |
6 | target 'MBMotion_Tests' do
7 | inherit! :search_paths
8 |
9 |
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/Example/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - MBMotion (0.1.0):
3 | - SnapKit
4 | - SnapKit (3.1.2)
5 |
6 | DEPENDENCIES:
7 | - MBMotion (from `../`)
8 |
9 | EXTERNAL SOURCES:
10 | MBMotion:
11 | :path: "../"
12 |
13 | SPEC CHECKSUMS:
14 | MBMotion: 3cc114a0e5f283620ee7e37438323ccbeaae2fc6
15 | SnapKit: 12b24f569cb7c143acc9c22b9d91b23e7b1c84a2
16 |
17 | PODFILE CHECKSUM: 0b2cb4d0648bf184b6a4a943e7ae8fe1537cec38
18 |
19 | COCOAPODS: 1.2.0.beta.1
20 |
--------------------------------------------------------------------------------
/Example/Pods/Local Podspecs/MBMotion.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "MBMotion",
3 | "version": "0.1.0",
4 | "summary": "MBMotion - Motion effects made by mmoaay.",
5 | "description": "Motion effects made by mmoaay.",
6 | "homepage": "https://github.com/mmoaay/MBMotion",
7 | "license": {
8 | "type": "MIT",
9 | "file": "LICENSE"
10 | },
11 | "authors": {
12 | "ZhengYidong": "yidong.zheng@ele.me"
13 | },
14 | "source": {
15 | "git": "https://github.com/mmoaay/MBMotion.git",
16 | "tag": "0.1.0"
17 | },
18 | "platforms": {
19 | "ios": "8.0"
20 | },
21 | "source_files": "MBMotion/Classes/**/*",
22 | "resources": "MBMotion/Assets/**/*",
23 | "dependencies": {
24 | "SnapKit": [
25 |
26 | ]
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Example/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - MBMotion (0.1.0):
3 | - SnapKit
4 | - SnapKit (3.1.2)
5 |
6 | DEPENDENCIES:
7 | - MBMotion (from `../`)
8 |
9 | EXTERNAL SOURCES:
10 | MBMotion:
11 | :path: "../"
12 |
13 | SPEC CHECKSUMS:
14 | MBMotion: 3cc114a0e5f283620ee7e37438323ccbeaae2fc6
15 | SnapKit: 12b24f569cb7c143acc9c22b9d91b23e7b1c84a2
16 |
17 | PODFILE CHECKSUM: 0b2cb4d0648bf184b6a4a943e7ae8fe1537cec38
18 |
19 | COCOAPODS: 1.2.0.beta.1
20 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/mmoaay.xcuserdatad/xcschemes/MBMotion.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/mmoaay.xcuserdatad/xcschemes/Pods-MBMotion_Example.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 |
66 |
67 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/mmoaay.xcuserdatad/xcschemes/Pods-MBMotion_Tests.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 |
66 |
67 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/mmoaay.xcuserdatad/xcschemes/SnapKit.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
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 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | SnapKit is a DSL to make Auto Layout easy on both iOS and OS X.
4 |
5 | [](https://travis-ci.org/SnapKit/SnapKit)
6 | [](https://github.com/SnapKit/SnapKit)
7 | [](https://cocoapods.org/pods/SnapKit)
8 | [](https://github.com/Carthage/Carthage)
9 |
10 | #### ⚠️ **To use with Swift 2.x please ensure you are using == 0.22.0** ⚠️
11 | #### ⚠️ **To use with Swift 3.x please ensure you are using >= 3.0.0** ⚠️
12 |
13 | ## Contents
14 |
15 | - [Requirements](#requirements)
16 | - [Migration Guides](#migration-guides)
17 | - [Communication](#communication)
18 | - [Installation](#installation)
19 | - [Usage](#usage)
20 | - [Credits](#credits)
21 | - [License](#license)
22 |
23 | ## Requirements
24 |
25 | - iOS 8.0+ / Mac OS X 10.11+ / tvOS 9.0+
26 | - Xcode 8.0+
27 | - Swift 3.0+
28 |
29 | ## Migration Guides
30 |
31 | - [SnapKit 3.0 Migration Guide](https://github.com/SnapKit/SnapKit/blob/master/Documentation/SnapKit%203.0%20Migration%20Guide.md)
32 |
33 | ## Communication
34 |
35 | - If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/snapkit). (Tag 'snapkit')
36 | - If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/snapkit).
37 | - If you **found a bug**, open an issue.
38 | - If you **have a feature request**, open an issue.
39 | - If you **want to contribute**, submit a pull request.
40 |
41 |
42 | ## Installation
43 |
44 | ### CocoaPods
45 |
46 | [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
47 |
48 | ```bash
49 | $ gem install cocoapods
50 | ```
51 |
52 | > CocoaPods 1.1.0+ is required to build SnapKit 3.0.0+.
53 |
54 | To integrate SnapKit into your Xcode project using CocoaPods, specify it in your `Podfile`:
55 |
56 | ```ruby
57 | source 'https://github.com/CocoaPods/Specs.git'
58 | platform :ios, '10.0'
59 | use_frameworks!
60 |
61 | target '' do
62 | pod 'SnapKit', '~> 3.1.2'
63 | end
64 | ```
65 |
66 | Then, run the following command:
67 |
68 | ```bash
69 | $ pod install
70 | ```
71 |
72 | ### Carthage
73 |
74 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
75 |
76 | You can install Carthage with [Homebrew](http://brew.sh/) using the following command:
77 |
78 | ```bash
79 | $ brew update
80 | $ brew install carthage
81 | ```
82 |
83 | To integrate SnapKit into your Xcode project using Carthage, specify it in your `Cartfile`:
84 |
85 | ```ogdl
86 | github "SnapKit/SnapKit" ~> 3.0.2
87 | ```
88 |
89 | Run `carthage update` to build the framework and drag the built `SnapKit.framework` into your Xcode project.
90 |
91 | ### Manually
92 |
93 | If you prefer not to use either of the aforementioned dependency managers, you can integrate SnapKit into your project manually.
94 |
95 | ---
96 |
97 | ## Usage
98 |
99 | ### Quick Start
100 |
101 | ```swift
102 | import SnapKit
103 |
104 | class MyViewController: UIViewController {
105 |
106 | lazy var box = UIView()
107 |
108 | override func viewDidLoad() {
109 | super.viewDidLoad()
110 |
111 | self.view.addSubview(box)
112 | box.snp.makeConstraints { (make) -> Void in
113 | make.width.height.equalTo(50)
114 | make.center.equalTo(self.view)
115 | }
116 | }
117 |
118 | }
119 | ```
120 |
121 | ### Resources
122 |
123 | - [Documentation](http://snapkit.io/docs/)
124 | - [F.A.Q.](http://snapkit.io/faq/)
125 |
126 | ## Credits
127 |
128 | - Robert Payne ([@robertjpayne](https://twitter.com/robertjpayne))
129 | - Many other contributors
130 |
131 | ## License
132 |
133 | SnapKit is released under the MIT license. See LICENSE for details.
134 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintConfig.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | public typealias ConstraintInterfaceLayoutDirection = UIUserInterfaceLayoutDirection
27 | #else
28 | import AppKit
29 | public typealias ConstraintInterfaceLayoutDirection = NSUserInterfaceLayoutDirection
30 | #endif
31 |
32 |
33 | public struct ConstraintConfig {
34 |
35 | public static var interfaceLayoutDirection: ConstraintInterfaceLayoutDirection = .leftToRight
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintConstantTarget.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public protocol ConstraintConstantTarget {
32 | }
33 |
34 | extension CGPoint: ConstraintConstantTarget {
35 | }
36 |
37 | extension CGSize: ConstraintConstantTarget {
38 | }
39 |
40 | extension ConstraintInsets: ConstraintConstantTarget {
41 | }
42 |
43 | extension ConstraintConstantTarget {
44 |
45 | internal func constraintConstantTargetValueFor(layoutAttribute: NSLayoutAttribute) -> CGFloat {
46 | if let value = self as? CGFloat {
47 | return value
48 | }
49 |
50 | if let value = self as? Float {
51 | return CGFloat(value)
52 | }
53 |
54 | if let value = self as? Double {
55 | return CGFloat(value)
56 | }
57 |
58 | if let value = self as? Int {
59 | return CGFloat(value)
60 | }
61 |
62 | if let value = self as? UInt {
63 | return CGFloat(value)
64 | }
65 |
66 | if let value = self as? CGSize {
67 | if layoutAttribute == .width {
68 | return value.width
69 | } else if layoutAttribute == .height {
70 | return value.height
71 | } else {
72 | return 0.0
73 | }
74 | }
75 |
76 | if let value = self as? CGPoint {
77 | #if os(iOS) || os(tvOS)
78 | switch layoutAttribute {
79 | case .left, .right, .leading, .trailing, .centerX, .leftMargin, .rightMargin, .leadingMargin, .trailingMargin, .centerXWithinMargins:
80 | return value.x
81 | case .top, .bottom, .centerY, .topMargin, .bottomMargin, .centerYWithinMargins, .lastBaseline, .firstBaseline:
82 | return value.y
83 | case .width, .height, .notAnAttribute:
84 | return 0.0
85 | }
86 | #else
87 | switch layoutAttribute {
88 | case .left, .right, .leading, .trailing, .centerX:
89 | return value.x
90 | case .top, .bottom, .centerY, .lastBaseline, .firstBaseline:
91 | return value.y
92 | case .width, .height, .notAnAttribute:
93 | return 0.0
94 | }
95 | #endif
96 | }
97 |
98 | if let value = self as? ConstraintInsets {
99 | #if os(iOS) || os(tvOS)
100 | switch layoutAttribute {
101 | case .left, .leftMargin, .centerX, .centerXWithinMargins:
102 | return value.left
103 | case .top, .topMargin, .centerY, .centerYWithinMargins, .lastBaseline, .firstBaseline:
104 | return value.top
105 | case .right, .rightMargin:
106 | return -value.right
107 | case .bottom, .bottomMargin:
108 | return -value.bottom
109 | case .leading, .leadingMargin:
110 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : value.right
111 | case .trailing, .trailingMargin:
112 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? -value.right : -value.left
113 | case .width:
114 | return -(value.left + value.right)
115 | case .height:
116 | return -(value.top + value.bottom)
117 | case .notAnAttribute:
118 | return 0.0
119 | }
120 | #else
121 | switch layoutAttribute {
122 | case .left, .centerX:
123 | return value.left
124 | case .top, .centerY, .lastBaseline, .firstBaseline:
125 | return value.top
126 | case .right:
127 | return -value.right
128 | case .bottom:
129 | return -value.bottom
130 | case .leading:
131 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : value.right
132 | case .trailing:
133 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? -value.right : -value.left
134 | case .width:
135 | return -(value.left + value.right)
136 | case .height:
137 | return -(value.top + value.bottom)
138 | case .notAnAttribute:
139 | return 0.0
140 | }
141 | #endif
142 | }
143 |
144 | return 0.0
145 | }
146 |
147 | }
148 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintDSL.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public protocol ConstraintDSL {
32 |
33 | var target: AnyObject? { get }
34 |
35 | func setLabel(_ value: String?)
36 | func label() -> String?
37 |
38 | }
39 | extension ConstraintDSL {
40 |
41 | public func setLabel(_ value: String?) {
42 | objc_setAssociatedObject(self.target, &labelKey, value, .OBJC_ASSOCIATION_COPY_NONATOMIC)
43 | }
44 | public func label() -> String? {
45 | return objc_getAssociatedObject(self.target, &labelKey) as? String
46 | }
47 |
48 | }
49 | private var labelKey: UInt8 = 0
50 |
51 |
52 | public protocol ConstraintBasicAttributesDSL : ConstraintDSL {
53 | }
54 | extension ConstraintBasicAttributesDSL {
55 |
56 | // MARK: Basics
57 |
58 | public var left: ConstraintItem {
59 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.left)
60 | }
61 |
62 | public var top: ConstraintItem {
63 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.top)
64 | }
65 |
66 | public var right: ConstraintItem {
67 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.right)
68 | }
69 |
70 | public var bottom: ConstraintItem {
71 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottom)
72 | }
73 |
74 | public var leading: ConstraintItem {
75 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.leading)
76 | }
77 |
78 | public var trailing: ConstraintItem {
79 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.trailing)
80 | }
81 |
82 | public var width: ConstraintItem {
83 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.width)
84 | }
85 |
86 | public var height: ConstraintItem {
87 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.height)
88 | }
89 |
90 | public var centerX: ConstraintItem {
91 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerX)
92 | }
93 |
94 | public var centerY: ConstraintItem {
95 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerY)
96 | }
97 |
98 | public var edges: ConstraintItem {
99 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.edges)
100 | }
101 |
102 | public var size: ConstraintItem {
103 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.size)
104 | }
105 |
106 | public var center: ConstraintItem {
107 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.center)
108 | }
109 |
110 | }
111 |
112 | public protocol ConstraintAttributesDSL : ConstraintBasicAttributesDSL {
113 | }
114 | extension ConstraintAttributesDSL {
115 |
116 | // MARK: Baselines
117 |
118 | @available(*, deprecated:3.0, message:"Use .lastBaseline instead")
119 | public var baseline: ConstraintItem {
120 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.lastBaseline)
121 | }
122 |
123 | @available(iOS 8.0, OSX 10.11, *)
124 | public var lastBaseline: ConstraintItem {
125 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.lastBaseline)
126 | }
127 |
128 | @available(iOS 8.0, OSX 10.11, *)
129 | public var firstBaseline: ConstraintItem {
130 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.firstBaseline)
131 | }
132 |
133 | // MARK: Margins
134 |
135 | @available(iOS 8.0, *)
136 | public var leftMargin: ConstraintItem {
137 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.leftMargin)
138 | }
139 |
140 | @available(iOS 8.0, *)
141 | public var topMargin: ConstraintItem {
142 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.topMargin)
143 | }
144 |
145 | @available(iOS 8.0, *)
146 | public var rightMargin: ConstraintItem {
147 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.rightMargin)
148 | }
149 |
150 | @available(iOS 8.0, *)
151 | public var bottomMargin: ConstraintItem {
152 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottomMargin)
153 | }
154 |
155 | @available(iOS 8.0, *)
156 | public var leadingMargin: ConstraintItem {
157 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.leadingMargin)
158 | }
159 |
160 | @available(iOS 8.0, *)
161 | public var trailingMargin: ConstraintItem {
162 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.trailingMargin)
163 | }
164 |
165 | @available(iOS 8.0, *)
166 | public var centerXWithinMargins: ConstraintItem {
167 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerXWithinMargins)
168 | }
169 |
170 | @available(iOS 8.0, *)
171 | public var centerYWithinMargins: ConstraintItem {
172 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerYWithinMargins)
173 | }
174 |
175 | @available(iOS 8.0, *)
176 | public var margins: ConstraintItem {
177 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.margins)
178 | }
179 |
180 | @available(iOS 8.0, *)
181 | public var centerWithinMargins: ConstraintItem {
182 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.centerWithinMargins)
183 | }
184 |
185 | }
186 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintDescription.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public class ConstraintDescription {
32 |
33 | internal let item: LayoutConstraintItem
34 | internal var attributes: ConstraintAttributes
35 | internal var relation: ConstraintRelation? = nil
36 | internal var sourceLocation: (String, UInt)? = nil
37 | internal var label: String? = nil
38 | internal var related: ConstraintItem? = nil
39 | internal var multiplier: ConstraintMultiplierTarget = 1.0
40 | internal var constant: ConstraintConstantTarget = 0.0
41 | internal var priority: ConstraintPriorityTarget = 1000.0
42 | internal lazy var constraint: Constraint? = {
43 | guard let relation = self.relation,
44 | let related = self.related,
45 | let sourceLocation = self.sourceLocation else {
46 | return nil
47 | }
48 | let from = ConstraintItem(target: self.item, attributes: self.attributes)
49 |
50 | return Constraint(
51 | from: from,
52 | to: related,
53 | relation: relation,
54 | sourceLocation: sourceLocation,
55 | label: self.label,
56 | multiplier: self.multiplier,
57 | constant: self.constant,
58 | priority: self.priority
59 | )
60 | }()
61 |
62 | // MARK: Initialization
63 |
64 | internal init(item: LayoutConstraintItem, attributes: ConstraintAttributes) {
65 | self.item = item
66 | self.attributes = attributes
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintInsetTarget.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public protocol ConstraintInsetTarget: ConstraintConstantTarget {
32 | }
33 |
34 | extension Int: ConstraintInsetTarget {
35 | }
36 |
37 | extension UInt: ConstraintInsetTarget {
38 | }
39 |
40 | extension Float: ConstraintInsetTarget {
41 | }
42 |
43 | extension Double: ConstraintInsetTarget {
44 | }
45 |
46 | extension CGFloat: ConstraintInsetTarget {
47 | }
48 |
49 | extension ConstraintInsets: ConstraintInsetTarget {
50 | }
51 |
52 | extension ConstraintInsetTarget {
53 |
54 | internal var constraintInsetTargetValue: ConstraintInsets {
55 | if let amount = self as? ConstraintInsets {
56 | return amount
57 | } else if let amount = self as? Float {
58 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount))
59 | } else if let amount = self as? Double {
60 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount))
61 | } else if let amount = self as? CGFloat {
62 | return ConstraintInsets(top: amount, left: amount, bottom: amount, right: amount)
63 | } else if let amount = self as? Int {
64 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount))
65 | } else if let amount = self as? UInt {
66 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount))
67 | } else {
68 | return ConstraintInsets(top: 0, left: 0, bottom: 0, right: 0)
69 | }
70 | }
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintInsets.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | #if os(iOS) || os(tvOS)
32 | public typealias ConstraintInsets = UIEdgeInsets
33 | #else
34 | public typealias ConstraintInsets = EdgeInsets
35 | #endif
36 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintItem.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public final class ConstraintItem {
32 |
33 | internal weak var target: AnyObject?
34 | internal let attributes: ConstraintAttributes
35 |
36 | internal init(target: AnyObject?, attributes: ConstraintAttributes) {
37 | self.target = target
38 | self.attributes = attributes
39 | }
40 |
41 | internal var layoutConstraintItem: LayoutConstraintItem? {
42 | return self.target as? LayoutConstraintItem
43 | }
44 |
45 | }
46 |
47 | public func ==(lhs: ConstraintItem, rhs: ConstraintItem) -> Bool {
48 | // pointer equality
49 | guard lhs !== rhs else {
50 | return true
51 | }
52 |
53 | // must both have valid targets and identical attributes
54 | guard let target1 = lhs.target,
55 | let target2 = rhs.target,
56 | target1 === target2 && lhs.attributes == rhs.attributes else {
57 | return false
58 | }
59 |
60 | return true
61 | }
62 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #endif
27 |
28 |
29 | @available(iOS 9.0, OSX 10.11, *)
30 | public extension ConstraintLayoutGuide {
31 |
32 | public var snp: ConstraintLayoutGuideDSL {
33 | return ConstraintLayoutGuideDSL(guide: self)
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | #if os(iOS) || os(tvOS)
32 | @available(iOS 9.0, *)
33 | public typealias ConstraintLayoutGuide = UILayoutGuide
34 | #else
35 | @available(OSX 10.11, *)
36 | public typealias ConstraintLayoutGuide = NSLayoutGuide
37 | #endif
38 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | @available(iOS 9.0, OSX 10.11, *)
32 | public struct ConstraintLayoutGuideDSL: ConstraintAttributesDSL {
33 |
34 | @discardableResult
35 | public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] {
36 | return ConstraintMaker.prepareConstraints(item: self.guide, closure: closure)
37 | }
38 |
39 | public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
40 | ConstraintMaker.makeConstraints(item: self.guide, closure: closure)
41 | }
42 |
43 | public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
44 | ConstraintMaker.remakeConstraints(item: self.guide, closure: closure)
45 | }
46 |
47 | public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
48 | ConstraintMaker.updateConstraints(item: self.guide, closure: closure)
49 | }
50 |
51 | public func removeConstraints() {
52 | ConstraintMaker.removeConstraints(item: self.guide)
53 | }
54 |
55 | public var target: AnyObject? {
56 | return self.guide
57 | }
58 |
59 | internal let guide: ConstraintLayoutGuide
60 |
61 | internal init(guide: ConstraintLayoutGuide) {
62 | self.guide = guide
63 |
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintLayoutSupport.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | #if os(iOS) || os(tvOS)
32 | @available(iOS 8.0, *)
33 | public typealias ConstraintLayoutSupport = UILayoutSupport
34 | #else
35 | public class ConstraintLayoutSupport {}
36 | #endif
37 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | @available(iOS 8.0, *)
32 | public struct ConstraintLayoutSupportDSL: ConstraintDSL {
33 |
34 | public var target: AnyObject? {
35 | return self.support
36 | }
37 |
38 | internal let support: ConstraintLayoutSupport
39 |
40 | internal init(support: ConstraintLayoutSupport) {
41 | self.support = support
42 |
43 | }
44 |
45 | public var top: ConstraintItem {
46 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.top)
47 | }
48 |
49 | public var bottom: ConstraintItem {
50 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottom)
51 | }
52 |
53 | public var height: ConstraintItem {
54 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.height)
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintMakerEditable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public class ConstraintMakerEditable: ConstraintMakerPriortizable {
32 |
33 | @discardableResult
34 | public func multipliedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable {
35 | self.description.multiplier = amount
36 | return self
37 | }
38 |
39 | @discardableResult
40 | public func dividedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable {
41 | return self.multipliedBy(1.0 / amount.constraintMultiplierTargetValue)
42 | }
43 |
44 | @discardableResult
45 | public func offset(_ amount: ConstraintOffsetTarget) -> ConstraintMakerEditable {
46 | self.description.constant = amount.constraintOffsetTargetValue
47 | return self
48 | }
49 |
50 | @discardableResult
51 | public func inset(_ amount: ConstraintInsetTarget) -> ConstraintMakerEditable {
52 | self.description.constant = amount.constraintInsetTargetValue
53 | return self
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintMakerExtendable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public class ConstraintMakerExtendable: ConstraintMakerRelatable {
32 |
33 | public var left: ConstraintMakerExtendable {
34 | self.description.attributes += .left
35 | return self
36 | }
37 |
38 | public var top: ConstraintMakerExtendable {
39 | self.description.attributes += .top
40 | return self
41 | }
42 |
43 | public var bottom: ConstraintMakerExtendable {
44 | self.description.attributes += .bottom
45 | return self
46 | }
47 |
48 | public var right: ConstraintMakerExtendable {
49 | self.description.attributes += .right
50 | return self
51 | }
52 |
53 | public var leading: ConstraintMakerExtendable {
54 | self.description.attributes += .leading
55 | return self
56 | }
57 |
58 | public var trailing: ConstraintMakerExtendable {
59 | self.description.attributes += .trailing
60 | return self
61 | }
62 |
63 | public var width: ConstraintMakerExtendable {
64 | self.description.attributes += .width
65 | return self
66 | }
67 |
68 | public var height: ConstraintMakerExtendable {
69 | self.description.attributes += .height
70 | return self
71 | }
72 |
73 | public var centerX: ConstraintMakerExtendable {
74 | self.description.attributes += .centerX
75 | return self
76 | }
77 |
78 | public var centerY: ConstraintMakerExtendable {
79 | self.description.attributes += .centerY
80 | return self
81 | }
82 |
83 | @available(*, deprecated:3.0, message:"Use lastBaseline instead")
84 | public var baseline: ConstraintMakerExtendable {
85 | self.description.attributes += .lastBaseline
86 | return self
87 | }
88 |
89 | public var lastBaseline: ConstraintMakerExtendable {
90 | self.description.attributes += .lastBaseline
91 | return self
92 | }
93 |
94 | @available(iOS 8.0, OSX 10.11, *)
95 | public var firstBaseline: ConstraintMakerExtendable {
96 | self.description.attributes += .firstBaseline
97 | return self
98 | }
99 |
100 | @available(iOS 8.0, *)
101 | public var leftMargin: ConstraintMakerExtendable {
102 | self.description.attributes += .leftMargin
103 | return self
104 | }
105 |
106 | @available(iOS 8.0, *)
107 | public var rightMargin: ConstraintMakerExtendable {
108 | self.description.attributes += .rightMargin
109 | return self
110 | }
111 |
112 | @available(iOS 8.0, *)
113 | public var bottomMargin: ConstraintMakerExtendable {
114 | self.description.attributes += .bottomMargin
115 | return self
116 | }
117 |
118 | @available(iOS 8.0, *)
119 | public var leadingMargin: ConstraintMakerExtendable {
120 | self.description.attributes += .leadingMargin
121 | return self
122 | }
123 |
124 | @available(iOS 8.0, *)
125 | public var trailingMargin: ConstraintMakerExtendable {
126 | self.description.attributes += .trailingMargin
127 | return self
128 | }
129 |
130 | @available(iOS 8.0, *)
131 | public var centerXWithinMargins: ConstraintMakerExtendable {
132 | self.description.attributes += .centerXWithinMargins
133 | return self
134 | }
135 |
136 | @available(iOS 8.0, *)
137 | public var centerYWithinMargins: ConstraintMakerExtendable {
138 | self.description.attributes += .centerYWithinMargins
139 | return self
140 | }
141 |
142 | public var edges: ConstraintMakerExtendable {
143 | self.description.attributes += .edges
144 | return self
145 | }
146 | public var size: ConstraintMakerExtendable {
147 | self.description.attributes += .size
148 | return self
149 | }
150 |
151 | @available(iOS 8.0, *)
152 | public var margins: ConstraintMakerExtendable {
153 | self.description.attributes += .margins
154 | return self
155 | }
156 |
157 | @available(iOS 8.0, *)
158 | public var centerWithinMargins: ConstraintMakerExtendable {
159 | self.description.attributes += .centerWithinMargins
160 | return self
161 | }
162 |
163 | }
164 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public class ConstraintMakerFinalizable {
32 |
33 | internal let description: ConstraintDescription
34 |
35 | internal init(_ description: ConstraintDescription) {
36 | self.description = description
37 | }
38 |
39 | @discardableResult
40 | public func labeled(_ label: String) -> ConstraintMakerFinalizable {
41 | self.description.label = label
42 | return self
43 | }
44 |
45 | public var constraint: Constraint {
46 | return self.description.constraint!
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public class ConstraintMakerPriortizable: ConstraintMakerFinalizable {
32 |
33 | @discardableResult
34 | public func priority(_ amount: ConstraintPriorityTarget) -> ConstraintMakerFinalizable {
35 | self.description.priority = amount
36 | return self
37 | }
38 |
39 | @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.")
40 | @discardableResult
41 | public func priorityRequired() -> ConstraintMakerFinalizable {
42 | return self.priority(1000)
43 | }
44 |
45 | @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.")
46 | @discardableResult
47 | public func priorityHigh() -> ConstraintMakerFinalizable {
48 | return self.priority(750)
49 | }
50 |
51 | @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.")
52 | @discardableResult
53 | public func priorityMedium() -> ConstraintMakerFinalizable {
54 | #if os(iOS) || os(tvOS)
55 | return self.priority(500)
56 | #else
57 | return self.priority(501)
58 | #endif
59 | }
60 |
61 | @available(*, deprecated:3.0, message:"Use priority(_ amount: ConstraintPriorityTarget) instead.")
62 | @discardableResult
63 | public func priorityLow() -> ConstraintMakerFinalizable {
64 | return self.priority(250)
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public class ConstraintMakerRelatable {
32 |
33 | internal let description: ConstraintDescription
34 |
35 | internal init(_ description: ConstraintDescription) {
36 | self.description = description
37 | }
38 |
39 | internal func relatedTo(_ other: ConstraintRelatableTarget, relation: ConstraintRelation, file: String, line: UInt) -> ConstraintMakerEditable {
40 | let related: ConstraintItem
41 | let constant: ConstraintConstantTarget
42 |
43 | if let other = other as? ConstraintItem {
44 | guard other.attributes == ConstraintAttributes.none ||
45 | other.attributes.layoutAttributes.count <= 1 ||
46 | other.attributes.layoutAttributes == self.description.attributes.layoutAttributes ||
47 | other.attributes == .edges && self.description.attributes == .margins ||
48 | other.attributes == .margins && self.description.attributes == .edges else {
49 | fatalError("Cannot constraint to multiple non identical attributes. (\(file), \(line))");
50 | }
51 |
52 | related = other
53 | constant = 0.0
54 | } else if let other = other as? ConstraintView {
55 | related = ConstraintItem(target: other, attributes: ConstraintAttributes.none)
56 | constant = 0.0
57 | } else if let other = other as? ConstraintConstantTarget {
58 | related = ConstraintItem(target: nil, attributes: ConstraintAttributes.none)
59 | constant = other
60 | } else if #available(iOS 9.0, OSX 10.11, *), let other = other as? ConstraintLayoutGuide {
61 | related = ConstraintItem(target: other, attributes: ConstraintAttributes.none)
62 | constant = 0.0
63 | } else {
64 | fatalError("Invalid constraint. (\(file), \(line))")
65 | }
66 |
67 | let editable = ConstraintMakerEditable(self.description)
68 | editable.description.sourceLocation = (file, line)
69 | editable.description.relation = relation
70 | editable.description.related = related
71 | editable.description.constant = constant
72 | return editable
73 | }
74 |
75 | @discardableResult
76 | public func equalTo(_ other: ConstraintRelatableTarget, _ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable {
77 | return self.relatedTo(other, relation: .equal, file: file, line: line)
78 | }
79 |
80 | @discardableResult
81 | public func equalToSuperview(_ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable {
82 | guard let other = self.description.item.superview else {
83 | fatalError("Expected superview but found nil when attempting make constraint `equalToSuperview`.")
84 | }
85 | return self.relatedTo(other, relation: .equal, file: file, line: line)
86 | }
87 |
88 | @discardableResult
89 | public func lessThanOrEqualTo(_ other: ConstraintRelatableTarget, _ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable {
90 | return self.relatedTo(other, relation: .lessThanOrEqual, file: file, line: line)
91 | }
92 |
93 | @discardableResult
94 | public func lessThanOrEqualToSuperview(_ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable {
95 | guard let other = self.description.item.superview else {
96 | fatalError("Expected superview but found nil when attempting make constraint `lessThanOrEqualToSuperview`.")
97 | }
98 | return self.relatedTo(other, relation: .lessThanOrEqual, file: file, line: line)
99 | }
100 |
101 | @discardableResult
102 | public func greaterThanOrEqualTo(_ other: ConstraintRelatableTarget, _ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable {
103 | return self.relatedTo(other, relation: .greaterThanOrEqual, file: file, line: line)
104 | }
105 |
106 | @discardableResult
107 | public func greaterThanOrEqualToSuperview(_ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable {
108 | guard let other = self.description.item.superview else {
109 | fatalError("Expected superview but found nil when attempting make constraint `greaterThanOrEqualToSuperview`.")
110 | }
111 | return self.relatedTo(other, relation: .greaterThanOrEqual, file: file, line: line)
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public protocol ConstraintMultiplierTarget {
32 |
33 | var constraintMultiplierTargetValue: CGFloat { get }
34 |
35 | }
36 |
37 | extension Int: ConstraintMultiplierTarget {
38 |
39 | public var constraintMultiplierTargetValue: CGFloat {
40 | return CGFloat(self)
41 | }
42 |
43 | }
44 |
45 | extension UInt: ConstraintMultiplierTarget {
46 |
47 | public var constraintMultiplierTargetValue: CGFloat {
48 | return CGFloat(self)
49 | }
50 |
51 | }
52 |
53 | extension Float: ConstraintMultiplierTarget {
54 |
55 | public var constraintMultiplierTargetValue: CGFloat {
56 | return CGFloat(self)
57 | }
58 |
59 | }
60 |
61 | extension Double: ConstraintMultiplierTarget {
62 |
63 | public var constraintMultiplierTargetValue: CGFloat {
64 | return CGFloat(self)
65 | }
66 |
67 | }
68 |
69 | extension CGFloat: ConstraintMultiplierTarget {
70 |
71 | public var constraintMultiplierTargetValue: CGFloat {
72 | return self
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintOffsetTarget.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public protocol ConstraintOffsetTarget: ConstraintConstantTarget {
32 | }
33 |
34 | extension Int: ConstraintOffsetTarget {
35 | }
36 |
37 | extension UInt: ConstraintOffsetTarget {
38 | }
39 |
40 | extension Float: ConstraintOffsetTarget {
41 | }
42 |
43 | extension Double: ConstraintOffsetTarget {
44 | }
45 |
46 | extension CGFloat: ConstraintOffsetTarget {
47 | }
48 |
49 | extension ConstraintOffsetTarget {
50 |
51 | internal var constraintOffsetTargetValue: CGFloat {
52 | let offset: CGFloat
53 | if let amount = self as? Float {
54 | offset = CGFloat(amount)
55 | } else if let amount = self as? Double {
56 | offset = CGFloat(amount)
57 | } else if let amount = self as? CGFloat {
58 | offset = CGFloat(amount)
59 | } else if let amount = self as? Int {
60 | offset = CGFloat(amount)
61 | } else if let amount = self as? UInt {
62 | offset = CGFloat(amount)
63 | } else {
64 | offset = 0.0
65 | }
66 | return offset
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintPriorityTarget.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public protocol ConstraintPriorityTarget {
32 |
33 | var constraintPriorityTargetValue: Float { get }
34 |
35 | }
36 |
37 | extension Int: ConstraintPriorityTarget {
38 |
39 | public var constraintPriorityTargetValue: Float {
40 | return Float(self)
41 | }
42 |
43 | }
44 |
45 | extension UInt: ConstraintPriorityTarget {
46 |
47 | public var constraintPriorityTargetValue: Float {
48 | return Float(self)
49 | }
50 |
51 | }
52 |
53 | extension Float: ConstraintPriorityTarget {
54 |
55 | public var constraintPriorityTargetValue: Float {
56 | return self
57 | }
58 |
59 | }
60 |
61 | extension Double: ConstraintPriorityTarget {
62 |
63 | public var constraintPriorityTargetValue: Float {
64 | return Float(self)
65 | }
66 |
67 | }
68 |
69 | extension CGFloat: ConstraintPriorityTarget {
70 |
71 | public var constraintPriorityTargetValue: Float {
72 | return Float(self)
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public protocol ConstraintRelatableTarget {
32 | }
33 |
34 | extension Int: ConstraintRelatableTarget {
35 | }
36 |
37 | extension UInt: ConstraintRelatableTarget {
38 | }
39 |
40 | extension Float: ConstraintRelatableTarget {
41 | }
42 |
43 | extension Double: ConstraintRelatableTarget {
44 | }
45 |
46 | extension CGFloat: ConstraintRelatableTarget {
47 | }
48 |
49 | extension CGSize: ConstraintRelatableTarget {
50 | }
51 |
52 | extension CGPoint: ConstraintRelatableTarget {
53 | }
54 |
55 | extension ConstraintInsets: ConstraintRelatableTarget {
56 | }
57 |
58 | extension ConstraintItem: ConstraintRelatableTarget {
59 | }
60 |
61 | extension ConstraintView: ConstraintRelatableTarget {
62 | }
63 |
64 | @available(iOS 9.0, OSX 10.11, *)
65 | extension ConstraintLayoutGuide: ConstraintRelatableTarget {
66 | }
67 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintRelation.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | internal enum ConstraintRelation : Int {
32 | case equal = 1
33 | case lessThanOrEqual
34 | case greaterThanOrEqual
35 |
36 | internal var layoutRelation: NSLayoutRelation {
37 | get {
38 | switch(self) {
39 | case .equal:
40 | return .equal
41 | case .lessThanOrEqual:
42 | return .lessThanOrEqual
43 | case .greaterThanOrEqual:
44 | return .greaterThanOrEqual
45 | }
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintView+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public extension ConstraintView {
32 |
33 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
34 | public var snp_left: ConstraintItem { return self.snp.left }
35 |
36 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
37 | public var snp_top: ConstraintItem { return self.snp.top }
38 |
39 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
40 | public var snp_right: ConstraintItem { return self.snp.right }
41 |
42 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
43 | public var snp_bottom: ConstraintItem { return self.snp.bottom }
44 |
45 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
46 | public var snp_leading: ConstraintItem { return self.snp.leading }
47 |
48 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
49 | public var snp_trailing: ConstraintItem { return self.snp.trailing }
50 |
51 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
52 | public var snp_width: ConstraintItem { return self.snp.width }
53 |
54 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
55 | public var snp_height: ConstraintItem { return self.snp.height }
56 |
57 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
58 | public var snp_centerX: ConstraintItem { return self.snp.centerX }
59 |
60 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
61 | public var snp_centerY: ConstraintItem { return self.snp.centerY }
62 |
63 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
64 | public var snp_baseline: ConstraintItem { return self.snp.baseline }
65 |
66 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
67 | @available(iOS 8.0, OSX 10.11, *)
68 | public var snp_lastBaseline: ConstraintItem { return self.snp.lastBaseline }
69 |
70 | @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.")
71 | @available(iOS 8.0, OSX 10.11, *)
72 | public var snp_firstBaseline: ConstraintItem { return self.snp.firstBaseline }
73 |
74 | @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.")
75 | @available(iOS 8.0, *)
76 | public var snp_leftMargin: ConstraintItem { return self.snp.leftMargin }
77 |
78 | @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.")
79 | @available(iOS 8.0, *)
80 | public var snp_topMargin: ConstraintItem { return self.snp.topMargin }
81 |
82 | @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.")
83 | @available(iOS 8.0, *)
84 | public var snp_rightMargin: ConstraintItem { return self.snp.rightMargin }
85 |
86 | @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.")
87 | @available(iOS 8.0, *)
88 | public var snp_bottomMargin: ConstraintItem { return self.snp.bottomMargin }
89 |
90 | @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.")
91 | @available(iOS 8.0, *)
92 | public var snp_leadingMargin: ConstraintItem { return self.snp.leadingMargin }
93 |
94 | @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.")
95 | @available(iOS 8.0, *)
96 | public var snp_trailingMargin: ConstraintItem { return self.snp.trailingMargin }
97 |
98 | @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.")
99 | @available(iOS 8.0, *)
100 | public var snp_centerXWithinMargins: ConstraintItem { return self.snp.centerXWithinMargins }
101 |
102 | @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.")
103 | @available(iOS 8.0, *)
104 | public var snp_centerYWithinMargins: ConstraintItem { return self.snp.centerYWithinMargins }
105 |
106 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
107 | public var snp_edges: ConstraintItem { return self.snp.edges }
108 |
109 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
110 | public var snp_size: ConstraintItem { return self.snp.size }
111 |
112 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
113 | public var snp_center: ConstraintItem { return self.snp.center }
114 |
115 | @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.")
116 | @available(iOS 8.0, *)
117 | public var snp_margins: ConstraintItem { return self.snp.margins }
118 |
119 | @available(iOS, deprecated:3.0, message:"Use newer snp.* syntax.")
120 | @available(iOS 8.0, *)
121 | public var snp_centerWithinMargins: ConstraintItem { return self.snp.centerWithinMargins }
122 |
123 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
124 | public func snp_prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] {
125 | return self.snp.prepareConstraints(closure)
126 | }
127 |
128 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
129 | public func snp_makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
130 | self.snp.makeConstraints(closure)
131 | }
132 |
133 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
134 | public func snp_remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
135 | self.snp.remakeConstraints(closure)
136 | }
137 |
138 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
139 | public func snp_updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
140 | self.snp.updateConstraints(closure)
141 | }
142 |
143 | @available(*, deprecated:3.0, message:"Use newer snp.* syntax.")
144 | public func snp_removeConstraints() {
145 | self.snp.removeConstraints()
146 | }
147 |
148 | public var snp: ConstraintViewDSL {
149 | return ConstraintViewDSL(view: self)
150 | }
151 |
152 | }
153 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | #if os(iOS) || os(tvOS)
32 | public typealias ConstraintView = UIView
33 | #else
34 | public typealias ConstraintView = NSView
35 | #endif
36 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/ConstraintViewDSL.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public struct ConstraintViewDSL: ConstraintAttributesDSL {
32 |
33 | @discardableResult
34 | public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] {
35 | return ConstraintMaker.prepareConstraints(item: self.view, closure: closure)
36 | }
37 |
38 | public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
39 | ConstraintMaker.makeConstraints(item: self.view, closure: closure)
40 | }
41 |
42 | public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
43 | ConstraintMaker.remakeConstraints(item: self.view, closure: closure)
44 | }
45 |
46 | public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) {
47 | ConstraintMaker.updateConstraints(item: self.view, closure: closure)
48 | }
49 |
50 | public func removeConstraints() {
51 | ConstraintMaker.removeConstraints(item: self.view)
52 | }
53 |
54 | public var contentHuggingHorizontalPriority: Float {
55 | get {
56 | return self.view.contentHuggingPriority(for: .horizontal)
57 | }
58 | set {
59 | self.view.setContentHuggingPriority(newValue, for: .horizontal)
60 | }
61 | }
62 |
63 | public var contentHuggingVerticalPriority: Float {
64 | get {
65 | return self.view.contentHuggingPriority(for: .vertical)
66 | }
67 | set {
68 | self.view.setContentHuggingPriority(newValue, for: .vertical)
69 | }
70 | }
71 |
72 | public var contentCompressionResistanceHorizontalPriority: Float {
73 | get {
74 | return self.view.contentCompressionResistancePriority(for: .horizontal)
75 | }
76 | set {
77 | self.view.setContentHuggingPriority(newValue, for: .horizontal)
78 | }
79 | }
80 |
81 | public var contentCompressionResistanceVerticalPriority: Float {
82 | get {
83 | return self.view.contentCompressionResistancePriority(for: .vertical)
84 | }
85 | set {
86 | self.view.setContentCompressionResistancePriority(newValue, for: .vertical)
87 | }
88 | }
89 |
90 | public var target: AnyObject? {
91 | return self.view
92 | }
93 |
94 | internal let view: ConstraintView
95 |
96 | internal init(view: ConstraintView) {
97 | self.view = view
98 |
99 | }
100 |
101 | }
102 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/Debugging.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 | public extension LayoutConstraint {
31 |
32 | override public var description: String {
33 | var description = "<"
34 |
35 | description += descriptionForObject(self)
36 |
37 | if let firstItem = conditionalOptional(from: self.firstItem) {
38 | description += " \(descriptionForObject(firstItem))"
39 | }
40 |
41 | if self.firstAttribute != .notAnAttribute {
42 | description += ".\(descriptionForAttribute(self.firstAttribute))"
43 | }
44 |
45 | description += " \(descriptionForRelation(self.relation))"
46 |
47 | if let secondItem = self.secondItem {
48 | description += " \(descriptionForObject(secondItem))"
49 | }
50 |
51 | if self.secondAttribute != .notAnAttribute {
52 | description += ".\(descriptionForAttribute(self.secondAttribute))"
53 | }
54 |
55 | if self.multiplier != 1.0 {
56 | description += " * \(self.multiplier)"
57 | }
58 |
59 | if self.secondAttribute == .notAnAttribute {
60 | description += " \(self.constant)"
61 | } else {
62 | if self.constant > 0.0 {
63 | description += " + \(self.constant)"
64 | } else if self.constant < 0.0 {
65 | description += " - \(abs(self.constant))"
66 | }
67 | }
68 |
69 | if self.priority != 1000.0 {
70 | description += " ^\(self.priority)"
71 | }
72 |
73 | description += ">"
74 |
75 | return description
76 | }
77 |
78 | }
79 |
80 | private func descriptionForRelation(_ relation: NSLayoutRelation) -> String {
81 | switch relation {
82 | case .equal: return "=="
83 | case .greaterThanOrEqual: return ">="
84 | case .lessThanOrEqual: return "<="
85 | }
86 | }
87 |
88 | private func descriptionForAttribute(_ attribute: NSLayoutAttribute) -> String {
89 | #if os(iOS) || os(tvOS)
90 | switch attribute {
91 | case .notAnAttribute: return "notAnAttribute"
92 | case .top: return "top"
93 | case .left: return "left"
94 | case .bottom: return "bottom"
95 | case .right: return "right"
96 | case .leading: return "leading"
97 | case .trailing: return "trailing"
98 | case .width: return "width"
99 | case .height: return "height"
100 | case .centerX: return "centerX"
101 | case .centerY: return "centerY"
102 | case .lastBaseline: return "lastBaseline"
103 | case .firstBaseline: return "firstBaseline"
104 | case .topMargin: return "topMargin"
105 | case .leftMargin: return "leftMargin"
106 | case .bottomMargin: return "bottomMargin"
107 | case .rightMargin: return "rightMargin"
108 | case .leadingMargin: return "leadingMargin"
109 | case .trailingMargin: return "trailingMargin"
110 | case .centerXWithinMargins: return "centerXWithinMargins"
111 | case .centerYWithinMargins: return "centerYWithinMargins"
112 | }
113 | #else
114 | switch attribute {
115 | case .notAnAttribute: return "notAnAttribute"
116 | case .top: return "top"
117 | case .left: return "left"
118 | case .bottom: return "bottom"
119 | case .right: return "right"
120 | case .leading: return "leading"
121 | case .trailing: return "trailing"
122 | case .width: return "width"
123 | case .height: return "height"
124 | case .centerX: return "centerX"
125 | case .centerY: return "centerY"
126 | case .lastBaseline: return "lastBaseline"
127 | case .firstBaseline: return "firstBaseline"
128 | }
129 | #endif
130 | }
131 |
132 | private func conditionalOptional(from object: Optional) -> Optional {
133 | return object
134 | }
135 |
136 | private func conditionalOptional(from object: T) -> Optional {
137 | return Optional.some(object)
138 | }
139 |
140 | private func descriptionForObject(_ object: AnyObject) -> String {
141 | let pointerDescription = String(format: "%p", UInt(bitPattern: ObjectIdentifier(object)))
142 | var desc = ""
143 |
144 | desc += type(of: object).description()
145 |
146 | if let object = object as? ConstraintView {
147 | desc += ":\(object.snp.label() ?? pointerDescription)"
148 | } else if let object = object as? LayoutConstraint {
149 | desc += ":\(object.label ?? pointerDescription)"
150 | } else {
151 | desc += ":\(pointerDescription)"
152 | }
153 |
154 | if let object = object as? LayoutConstraint, let file = object.constraint?.sourceLocation.0, let line = object.constraint?.sourceLocation.1 {
155 | desc += "@\((file as NSString).lastPathComponent)#\(line)"
156 | }
157 |
158 | desc += ""
159 | return desc
160 | }
161 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/LayoutConstraint.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public class LayoutConstraint : NSLayoutConstraint {
32 |
33 | public var label: String? {
34 | get {
35 | return self.identifier
36 | }
37 | set {
38 | self.identifier = newValue
39 | }
40 | }
41 |
42 | internal weak var constraint: Constraint? = nil
43 |
44 | }
45 |
46 | internal func ==(lhs: LayoutConstraint, rhs: LayoutConstraint) -> Bool {
47 | guard lhs.firstItem === rhs.firstItem &&
48 | lhs.secondItem === rhs.secondItem &&
49 | lhs.firstAttribute == rhs.firstAttribute &&
50 | lhs.secondAttribute == rhs.secondAttribute &&
51 | lhs.relation == rhs.relation &&
52 | lhs.priority == rhs.priority &&
53 | lhs.multiplier == rhs.multiplier else {
54 | return false
55 | }
56 | return true
57 | }
58 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/LayoutConstraintItem.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public protocol LayoutConstraintItem: class {
32 | }
33 |
34 | @available(iOS 9.0, OSX 10.11, *)
35 | extension ConstraintLayoutGuide : LayoutConstraintItem {
36 | }
37 |
38 | extension ConstraintView : LayoutConstraintItem {
39 | }
40 |
41 |
42 | extension LayoutConstraintItem {
43 |
44 | internal func prepare() {
45 | if let view = self as? ConstraintView {
46 | view.translatesAutoresizingMaskIntoConstraints = false
47 | }
48 | }
49 |
50 | internal var superview: ConstraintView? {
51 | if let view = self as? ConstraintView {
52 | return view.superview
53 | }
54 |
55 | if #available(iOS 9.0, OSX 10.11, *), let guide = self as? ConstraintLayoutGuide {
56 | return guide.owningView
57 | }
58 |
59 | return nil
60 | }
61 | internal var constraints: [Constraint] {
62 | return self.constraintsSet.allObjects as! [Constraint]
63 | }
64 |
65 | internal func add(constraints: [Constraint]) {
66 | let constraintsSet = self.constraintsSet
67 | for constraint in constraints {
68 | constraintsSet.add(constraint)
69 | }
70 | }
71 |
72 | internal func remove(constraints: [Constraint]) {
73 | let constraintsSet = self.constraintsSet
74 | for constraint in constraints {
75 | constraintsSet.remove(constraint)
76 | }
77 | }
78 |
79 | private var constraintsSet: NSMutableSet {
80 | let constraintsSet: NSMutableSet
81 |
82 | if let existing = objc_getAssociatedObject(self, &constraintsKey) as? NSMutableSet {
83 | constraintsSet = existing
84 | } else {
85 | constraintsSet = NSMutableSet()
86 | objc_setAssociatedObject(self, &constraintsKey, constraintsSet, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
87 | }
88 | return constraintsSet
89 |
90 | }
91 |
92 | }
93 | private var constraintsKey: UInt8 = 0
94 |
--------------------------------------------------------------------------------
/Example/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #endif
27 |
28 |
29 | @available(iOS 8.0, *)
30 | public extension ConstraintLayoutSupport {
31 |
32 | public var snp: ConstraintLayoutSupportDSL {
33 | return ConstraintLayoutSupportDSL(support: self)
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/MBMotion/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 | 0.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/MBMotion/MBMotion-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_MBMotion : NSObject
3 | @end
4 | @implementation PodsDummy_MBMotion
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/MBMotion/MBMotion-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/MBMotion/MBMotion-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double MBMotionVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char MBMotionVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/MBMotion/MBMotion.modulemap:
--------------------------------------------------------------------------------
1 | framework module MBMotion {
2 | umbrella header "MBMotion-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/MBMotion/MBMotion.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/MBMotion
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SnapKit"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
11 | SKIP_INSTALL = YES
12 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Example/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 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Example/Pods-MBMotion_Example-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## MBMotion
5 |
6 | Copyright (c) 2017 ZhengYidong
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 |
26 |
27 | ## SnapKit
28 |
29 | Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
30 |
31 | Permission is hereby granted, free of charge, to any person obtaining a copy
32 | of this software and associated documentation files (the "Software"), to deal
33 | in the Software without restriction, including without limitation the rights
34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35 | copies of the Software, and to permit persons to whom the Software is
36 | furnished to do so, subject to the following conditions:
37 |
38 | The above copyright notice and this permission notice shall be included in
39 | all copies or substantial portions of the Software.
40 |
41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
47 | THE SOFTWARE.
48 |
49 | Generated by CocoaPods - https://cocoapods.org
50 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Example/Pods-MBMotion_Example-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Copyright (c) 2017 ZhengYidong <yidong.zheng@ele.me>
18 |
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is
24 | furnished to do so, subject to the following conditions:
25 |
26 | The above copyright notice and this permission notice shall be included in
27 | all copies or substantial portions of the Software.
28 |
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 |
37 | License
38 | MIT
39 | Title
40 | MBMotion
41 | Type
42 | PSGroupSpecifier
43 |
44 |
45 | FooterText
46 | Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
47 |
48 | Permission is hereby granted, free of charge, to any person obtaining a copy
49 | of this software and associated documentation files (the "Software"), to deal
50 | in the Software without restriction, including without limitation the rights
51 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52 | copies of the Software, and to permit persons to whom the Software is
53 | furnished to do so, subject to the following conditions:
54 |
55 | The above copyright notice and this permission notice shall be included in
56 | all copies or substantial portions of the Software.
57 |
58 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
61 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
64 | THE SOFTWARE.
65 |
66 | License
67 | MIT
68 | Title
69 | SnapKit
70 | Type
71 | PSGroupSpecifier
72 |
73 |
74 | FooterText
75 | Generated by CocoaPods - https://cocoapods.org
76 | Title
77 |
78 | Type
79 | PSGroupSpecifier
80 |
81 |
82 | StringsTable
83 | Acknowledgements
84 | Title
85 | Acknowledgements
86 |
87 |
88 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Example/Pods-MBMotion_Example-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_MBMotion_Example : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_MBMotion_Example
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Example/Pods-MBMotion_Example-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
6 |
7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
8 |
9 | install_framework()
10 | {
11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
12 | local source="${BUILT_PRODUCTS_DIR}/$1"
13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
15 | elif [ -r "$1" ]; then
16 | local source="$1"
17 | fi
18 |
19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
20 |
21 | if [ -L "${source}" ]; then
22 | echo "Symlinked..."
23 | source="$(readlink "${source}")"
24 | fi
25 |
26 | # use filter instead of exclude so missing patterns dont' throw errors
27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
29 |
30 | local basename
31 | basename="$(basename -s .framework "$1")"
32 | binary="${destination}/${basename}.framework/${basename}"
33 | if ! [ -r "$binary" ]; then
34 | binary="${destination}/${basename}"
35 | fi
36 |
37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
39 | strip_invalid_archs "$binary"
40 | fi
41 |
42 | # Resign the code if required by the build settings to avoid unstable apps
43 | code_sign_if_enabled "${destination}/$(basename "$1")"
44 |
45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
47 | local swift_runtime_libs
48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
49 | for lib in $swift_runtime_libs; do
50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
52 | code_sign_if_enabled "${destination}/${lib}"
53 | done
54 | fi
55 | }
56 |
57 | # Signs a framework with the provided identity
58 | code_sign_if_enabled() {
59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
60 | # Use the current code_sign_identitiy
61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1""
63 |
64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
65 | code_sign_cmd="$code_sign_cmd &"
66 | fi
67 | echo "$code_sign_cmd"
68 | eval "$code_sign_cmd"
69 | fi
70 | }
71 |
72 | # Strip invalid architectures
73 | strip_invalid_archs() {
74 | binary="$1"
75 | # Get architectures for current file
76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
77 | stripped=""
78 | for arch in $archs; do
79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
80 | # Strip non-valid architectures in-place
81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1
82 | stripped="$stripped $arch"
83 | fi
84 | done
85 | if [[ "$stripped" ]]; then
86 | echo "Stripped $binary of architectures:$stripped"
87 | fi
88 | }
89 |
90 |
91 | if [[ "$CONFIGURATION" == "Debug" ]]; then
92 | install_framework "$BUILT_PRODUCTS_DIR/MBMotion/MBMotion.framework"
93 | install_framework "$BUILT_PRODUCTS_DIR/SnapKit/SnapKit.framework"
94 | fi
95 | if [[ "$CONFIGURATION" == "Release" ]]; then
96 | install_framework "$BUILT_PRODUCTS_DIR/MBMotion/MBMotion.framework"
97 | install_framework "$BUILT_PRODUCTS_DIR/SnapKit/SnapKit.framework"
98 | fi
99 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
100 | wait
101 | fi
102 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Example/Pods-MBMotion_Example-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
5 |
6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
7 | > "$RESOURCES_TO_COPY"
8 |
9 | XCASSET_FILES=()
10 |
11 | case "${TARGETED_DEVICE_FAMILY}" in
12 | 1,2)
13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
14 | ;;
15 | 1)
16 | TARGET_DEVICE_ARGS="--target-device iphone"
17 | ;;
18 | 2)
19 | TARGET_DEVICE_ARGS="--target-device ipad"
20 | ;;
21 | 3)
22 | TARGET_DEVICE_ARGS="--target-device tv"
23 | ;;
24 | *)
25 | TARGET_DEVICE_ARGS="--target-device mac"
26 | ;;
27 | esac
28 |
29 | install_resource()
30 | {
31 | if [[ "$1" = /* ]] ; then
32 | RESOURCE_PATH="$1"
33 | else
34 | RESOURCE_PATH="${PODS_ROOT}/$1"
35 | fi
36 | if [[ ! -e "$RESOURCE_PATH" ]] ; then
37 | cat << EOM
38 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
39 | EOM
40 | exit 1
41 | fi
42 | case $RESOURCE_PATH in
43 | *.storyboard)
44 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
45 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
46 | ;;
47 | *.xib)
48 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
49 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
50 | ;;
51 | *.framework)
52 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
53 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
54 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
55 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
56 | ;;
57 | *.xcdatamodel)
58 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\""
59 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
60 | ;;
61 | *.xcdatamodeld)
62 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\""
63 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
64 | ;;
65 | *.xcmappingmodel)
66 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\""
67 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
68 | ;;
69 | *.xcassets)
70 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
71 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
72 | ;;
73 | *)
74 | echo "$RESOURCE_PATH"
75 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
76 | ;;
77 | esac
78 | }
79 |
80 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
82 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
83 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
85 | fi
86 | rm -f "$RESOURCES_TO_COPY"
87 |
88 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ]
89 | then
90 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
91 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
92 | while read line; do
93 | if [[ $line != "${PODS_ROOT}*" ]]; then
94 | XCASSET_FILES+=("$line")
95 | fi
96 | done <<<"$OTHER_XCASSETS"
97 |
98 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
99 | fi
100 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Example/Pods-MBMotion_Example-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_MBMotion_ExampleVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_MBMotion_ExampleVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Example/Pods-MBMotion_Example.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MBMotion" "$PODS_CONFIGURATION_BUILD_DIR/SnapKit"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MBMotion/MBMotion.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers"
6 | OTHER_LDFLAGS = $(inherited) -framework "MBMotion" -framework "SnapKit"
7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
8 | PODS_BUILD_DIR = $BUILD_DIR
9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_ROOT = ${SRCROOT}/Pods
11 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Example/Pods-MBMotion_Example.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_MBMotion_Example {
2 | umbrella header "Pods-MBMotion_Example-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Example/Pods-MBMotion_Example.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MBMotion" "$PODS_CONFIGURATION_BUILD_DIR/SnapKit"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MBMotion/MBMotion.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers"
6 | OTHER_LDFLAGS = $(inherited) -framework "MBMotion" -framework "SnapKit"
7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
8 | PODS_BUILD_DIR = $BUILD_DIR
9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_ROOT = ${SRCROOT}/Pods
11 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Tests/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 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Tests/Pods-MBMotion_Tests-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 | Generated by CocoaPods - https://cocoapods.org
4 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Tests/Pods-MBMotion_Tests-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Generated by CocoaPods - https://cocoapods.org
18 | Title
19 |
20 | Type
21 | PSGroupSpecifier
22 |
23 |
24 | StringsTable
25 | Acknowledgements
26 | Title
27 | Acknowledgements
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Tests/Pods-MBMotion_Tests-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_MBMotion_Tests : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_MBMotion_Tests
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Tests/Pods-MBMotion_Tests-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
6 |
7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
8 |
9 | install_framework()
10 | {
11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
12 | local source="${BUILT_PRODUCTS_DIR}/$1"
13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
15 | elif [ -r "$1" ]; then
16 | local source="$1"
17 | fi
18 |
19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
20 |
21 | if [ -L "${source}" ]; then
22 | echo "Symlinked..."
23 | source="$(readlink "${source}")"
24 | fi
25 |
26 | # use filter instead of exclude so missing patterns dont' throw errors
27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
29 |
30 | local basename
31 | basename="$(basename -s .framework "$1")"
32 | binary="${destination}/${basename}.framework/${basename}"
33 | if ! [ -r "$binary" ]; then
34 | binary="${destination}/${basename}"
35 | fi
36 |
37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
39 | strip_invalid_archs "$binary"
40 | fi
41 |
42 | # Resign the code if required by the build settings to avoid unstable apps
43 | code_sign_if_enabled "${destination}/$(basename "$1")"
44 |
45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
47 | local swift_runtime_libs
48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
49 | for lib in $swift_runtime_libs; do
50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
52 | code_sign_if_enabled "${destination}/${lib}"
53 | done
54 | fi
55 | }
56 |
57 | # Signs a framework with the provided identity
58 | code_sign_if_enabled() {
59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
60 | # Use the current code_sign_identitiy
61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1""
63 |
64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
65 | code_sign_cmd="$code_sign_cmd &"
66 | fi
67 | echo "$code_sign_cmd"
68 | eval "$code_sign_cmd"
69 | fi
70 | }
71 |
72 | # Strip invalid architectures
73 | strip_invalid_archs() {
74 | binary="$1"
75 | # Get architectures for current file
76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
77 | stripped=""
78 | for arch in $archs; do
79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
80 | # Strip non-valid architectures in-place
81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1
82 | stripped="$stripped $arch"
83 | fi
84 | done
85 | if [[ "$stripped" ]]; then
86 | echo "Stripped $binary of architectures:$stripped"
87 | fi
88 | }
89 |
90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
91 | wait
92 | fi
93 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Tests/Pods-MBMotion_Tests-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
5 |
6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
7 | > "$RESOURCES_TO_COPY"
8 |
9 | XCASSET_FILES=()
10 |
11 | case "${TARGETED_DEVICE_FAMILY}" in
12 | 1,2)
13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
14 | ;;
15 | 1)
16 | TARGET_DEVICE_ARGS="--target-device iphone"
17 | ;;
18 | 2)
19 | TARGET_DEVICE_ARGS="--target-device ipad"
20 | ;;
21 | 3)
22 | TARGET_DEVICE_ARGS="--target-device tv"
23 | ;;
24 | *)
25 | TARGET_DEVICE_ARGS="--target-device mac"
26 | ;;
27 | esac
28 |
29 | install_resource()
30 | {
31 | if [[ "$1" = /* ]] ; then
32 | RESOURCE_PATH="$1"
33 | else
34 | RESOURCE_PATH="${PODS_ROOT}/$1"
35 | fi
36 | if [[ ! -e "$RESOURCE_PATH" ]] ; then
37 | cat << EOM
38 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
39 | EOM
40 | exit 1
41 | fi
42 | case $RESOURCE_PATH in
43 | *.storyboard)
44 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
45 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
46 | ;;
47 | *.xib)
48 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
49 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
50 | ;;
51 | *.framework)
52 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
53 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
54 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
55 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
56 | ;;
57 | *.xcdatamodel)
58 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\""
59 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
60 | ;;
61 | *.xcdatamodeld)
62 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\""
63 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
64 | ;;
65 | *.xcmappingmodel)
66 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\""
67 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
68 | ;;
69 | *.xcassets)
70 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
71 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
72 | ;;
73 | *)
74 | echo "$RESOURCE_PATH"
75 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
76 | ;;
77 | esac
78 | }
79 |
80 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
82 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
83 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
85 | fi
86 | rm -f "$RESOURCES_TO_COPY"
87 |
88 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ]
89 | then
90 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
91 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
92 | while read line; do
93 | if [[ $line != "${PODS_ROOT}*" ]]; then
94 | XCASSET_FILES+=("$line")
95 | fi
96 | done <<<"$OTHER_XCASSETS"
97 |
98 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
99 | fi
100 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Tests/Pods-MBMotion_Tests-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_MBMotion_TestsVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_MBMotion_TestsVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Tests/Pods-MBMotion_Tests.debug.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MBMotion" "$PODS_CONFIGURATION_BUILD_DIR/SnapKit"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MBMotion/MBMotion.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}/Pods
8 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Tests/Pods-MBMotion_Tests.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_MBMotion_Tests {
2 | umbrella header "Pods-MBMotion_Tests-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBMotion_Tests/Pods-MBMotion_Tests.release.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MBMotion" "$PODS_CONFIGURATION_BUILD_DIR/SnapKit"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MBMotion/MBMotion.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SnapKit/SnapKit.framework/Headers"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}/Pods
8 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SnapKit/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 | 3.1.2
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SnapKit/SnapKit-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SnapKit : NSObject
3 | @end
4 | @implementation PodsDummy_SnapKit
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double SnapKitVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char SnapKitVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SnapKit/SnapKit.modulemap:
--------------------------------------------------------------------------------
1 | framework module SnapKit {
2 | umbrella header "SnapKit-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SnapKit/SnapKit.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SnapKit
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 |
--------------------------------------------------------------------------------
/Example/Tests/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 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Example/Tests/Tests.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import XCTest
3 | import MBMotion
4 |
5 | class Tests: XCTestCase {
6 |
7 | override func setUp() {
8 | super.setUp()
9 | // Put setup code here. This method is called before the invocation of each test method in the class.
10 | }
11 |
12 | override func tearDown() {
13 | // Put teardown code here. This method is called after the invocation of each test method in the class.
14 | super.tearDown()
15 | }
16 |
17 | func testExample() {
18 | // This is an example of a functional test case.
19 | XCTAssert(true, "Pass")
20 | }
21 |
22 | func testPerformanceExample() {
23 | // This is an example of a performance test case.
24 | self.measure() {
25 | // Put the code you want to measure the time of here.
26 | }
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2017 ZhengYidong
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 |
--------------------------------------------------------------------------------
/MBMotion.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod lib lint MBMotion.podspec' to ensure this is a
3 | # valid spec before submitting.
4 | #
5 | # Any lines starting with a # are optional, but their use is encouraged
6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
7 | #
8 |
9 | Pod::Spec.new do |s|
10 | s.name = 'MBMotion'
11 | s.version = '0.1.0'
12 | s.summary = 'MBMotion - Motion effects made by mmoaay.'
13 |
14 | # This description is used to generate tags and improve search results.
15 | # * Think: What does it do? Why did you write it? What is the focus?
16 | # * Try to keep it short, snappy and to the point.
17 | # * Write the description between the DESC delimiters below.
18 | # * Finally, don't worry about the indent, CocoaPods strips it!
19 |
20 | s.description = <<-DESC
21 | Motion effects made by mmoaay.
22 | DESC
23 |
24 | s.homepage = 'https://github.com/mmoaay/MBMotion'
25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
26 | s.license = { :type => 'MIT', :file => 'LICENSE' }
27 | s.author = { 'ZhengYidong' => 'yidong.zheng@ele.me' }
28 | s.source = { :git => 'https://github.com/mmoaay/MBMotion.git', :tag => s.version.to_s }
29 | # s.social_media_url = 'http://weibo.com/smmoaay'
30 |
31 | s.ios.deployment_target = '8.0'
32 |
33 | s.source_files = 'MBMotion/Classes/**/*'
34 | s.resources = 'MBMotion/Assets/**/*'
35 |
36 | # s.resource_bundles = {
37 | # 'MBMotion' => ['MBMotion/Assets/*.png']
38 | # }
39 |
40 | # s.public_header_files = 'Pod/Classes/**/*.h'
41 | # s.frameworks = 'UIKit', 'MapKit'
42 | # s.dependency 'AFNetworking', '~> 2.3'
43 | s.dependency 'SnapKit'
44 | end
45 |
--------------------------------------------------------------------------------
/MBMotion/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/MBMotion/.DS_Store
--------------------------------------------------------------------------------
/MBMotion/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/MBMotion/Assets/.gitkeep
--------------------------------------------------------------------------------
/MBMotion/Assets/MBMotionActionSheet.xib:
--------------------------------------------------------------------------------
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 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/MBMotion/Assets/MBMotionTableViewCell.xib:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/MBMotion/Classes/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmoaay/MBMotion/55ce93b8cd8af8be352305c3b8e4ada205e8dc61/MBMotion/Classes/.gitkeep
--------------------------------------------------------------------------------
/MBMotion/Classes/Cell/MBMotionTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBMotionTableViewCell.swift
3 | // MBMotion
4 | //
5 | // Created by Perry on 15/12/9.
6 | // Copyright © 2015年 MmoaaY. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SnapKit
11 |
12 | public class MBMotionTableViewCell: UITableViewCell {
13 |
14 | override public func awakeFromNib() {
15 | super.awakeFromNib()
16 | // Initialization code
17 | }
18 |
19 | override public func setSelected(_ selected: Bool, animated: Bool) {
20 | super.setSelected(selected, animated: animated)
21 |
22 | // Configure the view for the selected state
23 | }
24 |
25 | public func setContent(_ content:UIView) {
26 | for subview in contentView.subviews {
27 | subview.removeFromSuperview()
28 | }
29 | contentView.addSubview(content)
30 |
31 | content.snp.makeConstraints { (make: ConstraintMaker) in
32 | make.edges.equalTo(self.contentView)
33 | }
34 | }
35 |
36 | public func animatedWithContent (_ status:MBMotionHamburgButtonStatus, index:Int, count:Int) {
37 | if status == MBMotionHamburgButtonStatus.open {
38 |
39 | var transform = CATransform3DIdentity
40 | transform = CATransform3DMakeTranslation(100, 0, 0)
41 | self.layer.transform = transform
42 | UIView.animate(withDuration: 0.3, delay: Double(index)*0.05, options: UIViewAnimationOptions.curveEaseOut, animations: { () -> Void in
43 |
44 | transform = CATransform3DIdentity
45 | transform = CATransform3DMakeTranslation(-6, 0, 0)
46 | self.layer.transform = transform
47 |
48 | }, completion: { (Bool) -> Void in
49 |
50 | UIView.animate(withDuration: 0.2, animations: { () -> Void in
51 | self.layer.transform = CATransform3DIdentity
52 | })
53 | })
54 |
55 | self.layer.opacity = 0.0
56 | UIView.animate(withDuration: 0.5, delay: Double(index)*0.05, options: UIViewAnimationOptions.curveEaseOut, animations: { () -> Void in
57 | self.layer.opacity = 1.0
58 | }, completion: nil)
59 | }else {
60 | var transform = CATransform3DIdentity
61 | transform = CATransform3DMakeTranslation(-6, 0, 0)
62 |
63 | UIView.animate(withDuration: 0.05, delay: Double(count-1-index)*0.02, options: UIViewAnimationOptions.curveEaseOut, animations: { () -> Void in
64 |
65 | self.layer.transform = transform
66 |
67 | }, completion: { (Bool) -> Void in
68 |
69 | UIView.animate(withDuration: 0.05, animations: { () -> Void in
70 | transform = CATransform3DIdentity
71 | transform = CATransform3DMakeTranslation(100, 0, 0)
72 | self.layer.transform = transform
73 | })
74 | })
75 |
76 | self.layer.opacity = 1.0
77 | UIView.animate(withDuration: 0.15, delay: Double(count-1-index)*0.02, options: UIViewAnimationOptions.curveEaseOut, animations: { () -> Void in
78 | self.layer.opacity = 0.0
79 | }, completion: nil)
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/MBMotion/Classes/Extension/UIView+Frame.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewFrameExtension.swift
3 | // MBMotion
4 | //
5 | // Created by Perry on 15/9/11.
6 | // Copyright (c) 2015年 MmoaaY. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | extension UIView{
13 | var x:CGFloat {
14 | get{
15 | return frame.origin.x
16 | }
17 | set{
18 | var f = frame
19 | f.origin.x = newValue
20 | frame = f
21 | }
22 | }
23 | var y:CGFloat {
24 | get{
25 | return frame.origin.y
26 | }
27 | set{
28 | var f = frame
29 | f.origin.y = newValue
30 | frame = f
31 | }
32 | }
33 | var width:CGFloat {
34 | get{
35 | return frame.size.width
36 | }
37 | set{
38 | var f = frame
39 | f.size.width = newValue
40 | frame = f
41 | }
42 | }
43 | var height:CGFloat {
44 | get{
45 | return frame.size.height
46 | }
47 | set{
48 | var f = frame
49 | f.size.height = newValue
50 | frame = f
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/MBMotion/Classes/HamburgButton/MBMotionHamburgButton.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBMotionHamburgButton.swift
3 | // MBMotion
4 | //
5 | // Created by Perry on 15/12/3.
6 | // Copyright © 2015年 MmoaaY. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public protocol MBMotionHamburgButtonDelegate {
12 | func buttonPressed(_ status:MBMotionHamburgButtonStatus)
13 | }
14 |
15 | public enum MBMotionHamburgButtonStatus:Int{
16 | case open
17 | case close
18 | }
19 |
20 | public class MBMotionHamburgButton: UIView {
21 |
22 | @IBOutlet var button: UIButton!
23 | @IBOutlet var view: UIView!
24 | public var delegate: MBMotionHamburgButtonDelegate?
25 |
26 | fileprivate var status = MBMotionHamburgButtonStatus.open
27 | /*
28 | // Only override drawRect: if you perform custom drawing.
29 | // An empty implementation adversely affects performance during animation.
30 | override func drawRect(rect: CGRect) {
31 | // Drawing code
32 | }
33 | */
34 |
35 | @IBOutlet var lineView: UIView!
36 | @IBOutlet fileprivate var topLine: UIView!
37 | @IBOutlet fileprivate var bottomLine: UIView!
38 |
39 | @IBAction func buttonPressed(_ sender: AnyObject) {
40 | self.delegate?.buttonPressed(self.status)
41 |
42 | self.animatedWithButton()
43 | }
44 |
45 | fileprivate func animatedWithButton() {
46 | if self.status == MBMotionHamburgButtonStatus.open {
47 | self.closeSwitchButton()
48 | } else {
49 | self.openSwithButton()
50 | }
51 | }
52 |
53 | fileprivate func animtedWithLineColor(_ line:UIView!, color:UIColor, duration:TimeInterval) {
54 | UIView.animate(withDuration: duration, animations: { () -> Void in
55 | line.layer.backgroundColor = color.cgColor
56 | })
57 | }
58 |
59 | fileprivate func animtedWithLineShape(_ line:UIView!, angle:CGFloat, tx:CGFloat,ty:CGFloat, duration:TimeInterval) {
60 | var transform = CATransform3DIdentity
61 | transform = CATransform3DTranslate(transform, tx, ty, 0)
62 | transform = CATransform3DRotate(transform, angle, 0, 0, 1)
63 |
64 | let animation = CABasicAnimation(keyPath: "transform")
65 | animation.fromValue = NSValue(caTransform3D: line.layer.transform)
66 | animation.toValue = NSValue(caTransform3D: transform)
67 | animation.duration = duration
68 |
69 | line.layer.add(animation, forKey: "lineshape")
70 | line.layer.transform = transform
71 | }
72 |
73 | fileprivate func closeSwitchButton() {
74 | self.button.isEnabled = false
75 | self.animtedWithLineShape(self.topLine, angle: 0.0, tx: 0, ty: 3, duration: 0.2)
76 | self.animtedWithLineShape(self.bottomLine, angle: 0.0, tx: 0, ty: -3, duration: 0.2)
77 |
78 | self.animtedWithLineColor(self.topLine, color: UIColor(red: 173/255, green: 181/255, blue: 184/255, alpha: 1), duration: 0.8)
79 | self.animtedWithLineColor(self.bottomLine, color: UIColor(red: 173/255, green: 181/255, blue: 184/255, alpha: 1), duration: 0.8)
80 |
81 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+0.2) {
82 | self.animtedWithLineShape(self.topLine, angle: 0.0, tx: 0, ty: 4.5, duration: 0.2)
83 | self.animtedWithLineShape(self.bottomLine, angle: 0.0, tx: 0, ty: -4.5, duration: 0.2)
84 | }
85 |
86 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+0.4) {
87 | self.animtedWithLineShape(self.topLine, angle: CGFloat(M_PI_4+M_PI_4/5), tx: 0, ty: 4.5, duration: 0.3)
88 | self.animtedWithLineShape(self.bottomLine, angle: CGFloat(M_PI_4*3+M_PI_4/5), tx: 0, ty: -4.5, duration: 0.3)
89 | }
90 |
91 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+0.7) {
92 | self.animtedWithLineShape(self.topLine, angle: CGFloat(M_PI_4), tx: 0, ty: 4.5, duration: 0.1)
93 | self.animtedWithLineShape(self.bottomLine, angle: CGFloat(M_PI_4*3), tx: 0, ty: -4.5, duration: 0.1)
94 | }
95 |
96 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+0.8) {
97 | self.status = MBMotionHamburgButtonStatus.close
98 | self.button.isEnabled = true
99 | }
100 | }
101 |
102 | fileprivate func openSwithButton() {
103 | self.button.isEnabled = false
104 | self.animtedWithLineShape(self.topLine, angle: CGFloat(M_PI_4+M_PI_4/5), tx: 0, ty: 4.5, duration: 0.1)
105 | self.animtedWithLineShape(self.bottomLine, angle: CGFloat(M_PI_4*3+M_PI_4/5), tx: 0, ty: -4.5, duration: 0.1)
106 |
107 | self.animtedWithLineColor(self.topLine, color: UIColor.white, duration: 0.8)
108 | self.animtedWithLineColor(self.bottomLine, color: UIColor.white, duration: 0.8)
109 |
110 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+0.1) {
111 | self.animtedWithLineShape(self.topLine, angle: 0.0, tx: 0, ty: 4.5, duration: 0.3)
112 | self.animtedWithLineShape(self.bottomLine, angle: 0.0, tx: 0, ty: -4.5, duration: 0.3)
113 | }
114 |
115 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+0.4) {
116 | self.animtedWithLineShape(self.topLine, angle: 0.0, tx: 0, ty: 3, duration: 0.2)
117 | self.animtedWithLineShape(self.bottomLine, angle: 0.0, tx: 0, ty: -3, duration: 0.2)
118 | }
119 |
120 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+0.6) {
121 | self.animtedWithLineShape(self.topLine, angle: 0.0, tx: 0, ty: 0, duration: 0.2)
122 | self.animtedWithLineShape(self.bottomLine, angle: 0.0, tx: 0, ty: 0, duration: 0.2)
123 | }
124 |
125 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+0.8) {
126 | self.status = MBMotionHamburgButtonStatus.open
127 | self.button.isEnabled = true
128 | }
129 | }
130 |
131 | override public func awakeFromNib() {
132 | super.awakeFromNib()
133 |
134 | Bundle(for: self.classForCoder).loadNibNamed("MBMotionHamburgButton", owner: self, options: nil)
135 |
136 | self.addSubview(self.view)
137 | self.view.snp.makeConstraints { (make) -> Void in
138 | make.leading.top.bottom.trailing.equalTo(self)
139 | }
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # MBMotion
2 |
3 | [](https://travis-ci.org/ZhengYidong/MBMotion)
4 | [](http://cocoapods.org/pods/MBMotion)
5 | [](http://cocoapods.org/pods/MBMotion)
6 | [](http://cocoapods.org/pods/MBMotion)
7 |
8 | ## List
9 |
10 | |Name|Class|Demo|Remark|
11 | |:-:|:-:|:-:|:-:|
12 | |ActionSheet|MBMotionActionSheet|  | |
13 | |Eye Loading|MBEyeLoading|  |  |
14 | |Hamburg Button|MBMotionHamburgButton|  | - |
15 |
16 | ## Example
17 |
18 | To run the example project, clone the repo, and run `pod install` from the Example directory first.
19 |
20 | ## Requirements
21 |
22 | ## Installation
23 |
24 | MBMotion is available through [CocoaPods](http://cocoapods.org). To install
25 | it, simply add the following line to your Podfile:
26 |
27 | ```ruby
28 | pod "MBMotion"
29 | ```
30 |
31 | ## Author
32 |
33 | mmoaay, mm@swift.gg
34 |
35 | ## License
36 |
37 | MBMotion is available under the MIT license. See the LICENSE file for more info.
38 |
--------------------------------------------------------------------------------
/_Pods.xcodeproj:
--------------------------------------------------------------------------------
1 | Example/Pods/Pods.xcodeproj
--------------------------------------------------------------------------------