Commit cae21143 by whitepixelstudios Committed by GitHub

Merge pull request #3 from CosmicMind/master

Update version
parents be45d80b 112992a8
......@@ -16,3 +16,12 @@ profile
*.moved-aside
*.playground
*.framework
Sources/Frameworks/Motion/.git*
Sources/Frameworks/Motion/.gitignore
Sources/Frameworks/Motion/.swift-version
Sources/Frameworks/Motion/CONTRIBUTING.md
Sources/Frameworks/Motion/Motion.podspec
Sources/Frameworks/Motion/Motion.xcodeproj/
Sources/Frameworks/Motion/Sources/Info.plist
Sources/Frameworks/Motion/Sources/Motion.h
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '2.8.1'
s.version = '2.9.4'
s.license = 'BSD-3-Clause'
s.summary = 'Material Design library used to create beautiful applications.'
s.summary = 'A Material Design library for creating beautiful applications.'
s.homepage = 'http://materialswift.com'
s.social_media_url = 'https://www.facebook.com/cosmicmindcom'
s.authors = { 'CosmicMind, Inc.' => 'support@cosmicmind.com' }
......
......@@ -7,8 +7,45 @@
objects = {
/* Begin PBXBuildFile section */
961154CC1F32A7B100A78D74 /* ChipBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961154CB1F32A7B100A78D74 /* ChipBar.swift */; };
961409B11E43D15C00E7BA99 /* FABMenu.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96A183621E0C6CE200083C30 /* FABMenu.swift */; settings = {ATTRIBUTES = (Public, ); }; };
961409B21E43D15C00E7BA99 /* FABMenuController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96A183641E0C6DD400083C30 /* FABMenuController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
961527801F393C0E00E8B2AC /* MotionAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527581F393C0E00E8B2AC /* MotionAnimator.swift */; };
961527811F393C0E00E8B2AC /* MotionAnimatorViewContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527591F393C0E00E8B2AC /* MotionAnimatorViewContext.swift */; };
961527821F393C0E00E8B2AC /* MotionCoreAnimationViewContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615275A1F393C0E00E8B2AC /* MotionCoreAnimationViewContext.swift */; };
961527831F393C0E00E8B2AC /* MotionHasInsertOrder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615275B1F393C0E00E8B2AC /* MotionHasInsertOrder.swift */; };
961527841F393C0E00E8B2AC /* MotionTransitionAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615275C1F393C0E00E8B2AC /* MotionTransitionAnimator.swift */; };
961527851F393C0E00E8B2AC /* MotionViewPropertyViewContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615275D1F393C0E00E8B2AC /* MotionViewPropertyViewContext.swift */; };
961527861F393C0E00E8B2AC /* Motion+Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615275F1F393C0E00E8B2AC /* Motion+Array.swift */; };
961527871F393C0E00E8B2AC /* Motion+CALayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527601F393C0E00E8B2AC /* Motion+CALayer.swift */; };
961527881F393C0E00E8B2AC /* Motion+CAMediaTimingFunction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527611F393C0E00E8B2AC /* Motion+CAMediaTimingFunction.swift */; };
961527891F393C0E00E8B2AC /* Motion+CG.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527621F393C0E00E8B2AC /* Motion+CG.swift */; };
9615278A1F393C0E00E8B2AC /* Motion+Obj-C.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527631F393C0E00E8B2AC /* Motion+Obj-C.swift */; };
9615278B1F393C0E00E8B2AC /* Motion+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527641F393C0E00E8B2AC /* Motion+UIKit.swift */; };
9615278C1F393C0E00E8B2AC /* Motion+UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527651F393C0E00E8B2AC /* Motion+UIView.swift */; };
9615278D1F393C0E00E8B2AC /* Motion+UIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527661F393C0E00E8B2AC /* Motion+UIViewController.swift */; };
9615278E1F393C0E00E8B2AC /* MotionAnimationFillMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527671F393C0E00E8B2AC /* MotionAnimationFillMode.swift */; };
961527901F393C0E00E8B2AC /* Motion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527691F393C0E00E8B2AC /* Motion.swift */; };
961527911F393C0E00E8B2AC /* MotionAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615276A1F393C0E00E8B2AC /* MotionAnimation.swift */; };
961527921F393C0E00E8B2AC /* MotionAnimationState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615276B1F393C0E00E8B2AC /* MotionAnimationState.swift */; };
961527931F393C0E00E8B2AC /* MotionCAAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615276C1F393C0E00E8B2AC /* MotionCAAnimation.swift */; };
961527941F393C0E00E8B2AC /* MotionContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615276D1F393C0E00E8B2AC /* MotionContext.swift */; };
961527951F393C0E00E8B2AC /* MotionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615276E1F393C0E00E8B2AC /* MotionController.swift */; };
961527961F393C0E00E8B2AC /* MotionCoordinateSpace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615276F1F393C0E00E8B2AC /* MotionCoordinateSpace.swift */; };
961527971F393C0E00E8B2AC /* MotionIndependentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527701F393C0E00E8B2AC /* MotionIndependentController.swift */; };
961527981F393C0E00E8B2AC /* MotionPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527711F393C0E00E8B2AC /* MotionPlugin.swift */; };
961527991F393C0E00E8B2AC /* MotionSnapshotType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527721F393C0E00E8B2AC /* MotionSnapshotType.swift */; };
9615279A1F393C0E00E8B2AC /* MotionTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527731F393C0E00E8B2AC /* MotionTransition.swift */; };
9615279B1F393C0E00E8B2AC /* MotionTransitionObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527741F393C0E00E8B2AC /* MotionTransitionObserver.swift */; };
9615279C1F393C0E00E8B2AC /* MotionTransitionState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527751F393C0E00E8B2AC /* MotionTransitionState.swift */; };
9615279D1F393C0E00E8B2AC /* CascadePreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527771F393C0E00E8B2AC /* CascadePreprocessor.swift */; };
9615279E1F393C0E00E8B2AC /* DurationPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527781F393C0E00E8B2AC /* DurationPreprocessor.swift */; };
9615279F1F393C0E00E8B2AC /* IgnoreSubviewModifiersPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527791F393C0E00E8B2AC /* IgnoreSubviewModifiersPreprocessor.swift */; };
961527A01F393C0E00E8B2AC /* MatchPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615277A1F393C0E00E8B2AC /* MatchPreprocessor.swift */; };
961527A11F393C0E00E8B2AC /* MotionPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615277B1F393C0E00E8B2AC /* MotionPreprocessor.swift */; };
961527A21F393C0E00E8B2AC /* SourcePreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615277C1F393C0E00E8B2AC /* SourcePreprocessor.swift */; };
961527A31F393C0E00E8B2AC /* TransitionPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9615277D1F393C0E00E8B2AC /* TransitionPreprocessor.swift */; };
961527B91F3A509900E8B2AC /* ChipBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961527B81F3A509900E8B2AC /* ChipBarController.swift */; };
9617B07D1DFCA8CF00410F8F /* Application.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961E6BDE1DDA2A95004E6C93 /* Application.swift */; settings = {ATTRIBUTES = (Public, ); }; };
9617B07E1DFCA8CF00410F8F /* Card.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB75D1CB40DC500C806FE /* Card.swift */; settings = {ATTRIBUTES = (Public, ); }; };
9617B07F1DFCA8CF00410F8F /* ImageCard.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7621CB40DC500C806FE /* ImageCard.swift */; settings = {ATTRIBUTES = (Public, ); }; };
......@@ -24,41 +61,6 @@
9617B0911DFCA8CF00410F8F /* ToolbarController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7A01CB40DC500C806FE /* ToolbarController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
961E6BDF1DDA2A95004E6C93 /* Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961E6BDE1DDA2A95004E6C93 /* Application.swift */; };
961E6BE21DDA2AF3004E6C93 /* Screen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961E6BE11DDA2AF3004E6C93 /* Screen.swift */; };
9630ACE51F29A26B00B4217D /* MotionAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACBD1F29A26B00B4217D /* MotionAnimator.swift */; };
9630ACE61F29A26B00B4217D /* MotionAnimatorViewContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACBE1F29A26B00B4217D /* MotionAnimatorViewContext.swift */; };
9630ACE71F29A26B00B4217D /* MotionCoreAnimationViewContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACBF1F29A26B00B4217D /* MotionCoreAnimationViewContext.swift */; };
9630ACE81F29A26B00B4217D /* MotionHasInsertOrder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACC01F29A26B00B4217D /* MotionHasInsertOrder.swift */; };
9630ACE91F29A26B00B4217D /* MotionTransitionAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACC11F29A26B00B4217D /* MotionTransitionAnimator.swift */; };
9630ACEA1F29A26B00B4217D /* MotionViewPropertyViewContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACC21F29A26B00B4217D /* MotionViewPropertyViewContext.swift */; };
9630ACEB1F29A26B00B4217D /* Motion+Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACC41F29A26B00B4217D /* Motion+Array.swift */; };
9630ACEC1F29A26B00B4217D /* Motion+CALayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACC51F29A26B00B4217D /* Motion+CALayer.swift */; };
9630ACED1F29A26B00B4217D /* Motion+CAMediaTimingFunction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACC61F29A26B00B4217D /* Motion+CAMediaTimingFunction.swift */; };
9630ACEE1F29A26B00B4217D /* Motion+CG.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACC71F29A26B00B4217D /* Motion+CG.swift */; };
9630ACEF1F29A26B00B4217D /* Motion+Obj-C.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACC81F29A26B00B4217D /* Motion+Obj-C.swift */; };
9630ACF01F29A26B00B4217D /* Motion+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACC91F29A26B00B4217D /* Motion+UIKit.swift */; };
9630ACF11F29A26B00B4217D /* Motion+UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACCA1F29A26B00B4217D /* Motion+UIView.swift */; };
9630ACF21F29A26B00B4217D /* Motion+UIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACCB1F29A26B00B4217D /* Motion+UIViewController.swift */; };
9630ACF31F29A26B00B4217D /* MotionAnimationFillMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACCC1F29A26B00B4217D /* MotionAnimationFillMode.swift */; };
9630ACF51F29A26B00B4217D /* Motion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACCE1F29A26B00B4217D /* Motion.swift */; };
9630ACF61F29A26B00B4217D /* MotionAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACCF1F29A26B00B4217D /* MotionAnimation.swift */; };
9630ACF71F29A26B00B4217D /* MotionAnimationState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACD01F29A26B00B4217D /* MotionAnimationState.swift */; };
9630ACF81F29A26B00B4217D /* MotionCAAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACD11F29A26B00B4217D /* MotionCAAnimation.swift */; };
9630ACF91F29A26B00B4217D /* MotionContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACD21F29A26B00B4217D /* MotionContext.swift */; };
9630ACFA1F29A26B00B4217D /* MotionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACD31F29A26B00B4217D /* MotionController.swift */; };
9630ACFB1F29A26B00B4217D /* MotionCoordinateSpace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACD41F29A26B00B4217D /* MotionCoordinateSpace.swift */; };
9630ACFC1F29A26B00B4217D /* MotionIndependentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACD51F29A26B00B4217D /* MotionIndependentController.swift */; };
9630ACFD1F29A26B00B4217D /* MotionPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACD61F29A26B00B4217D /* MotionPlugin.swift */; };
9630ACFE1F29A26B00B4217D /* MotionSnapshotType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACD71F29A26B00B4217D /* MotionSnapshotType.swift */; };
9630ACFF1F29A26B00B4217D /* MotionTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACD81F29A26B00B4217D /* MotionTransition.swift */; };
9630AD001F29A26B00B4217D /* MotionTransitionObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACD91F29A26B00B4217D /* MotionTransitionObserver.swift */; };
9630AD011F29A26B00B4217D /* MotionTransitionState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACDA1F29A26B00B4217D /* MotionTransitionState.swift */; };
9630AD021F29A26B00B4217D /* CascadePreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACDC1F29A26B00B4217D /* CascadePreprocessor.swift */; };
9630AD031F29A26B00B4217D /* DurationPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACDD1F29A26B00B4217D /* DurationPreprocessor.swift */; };
9630AD041F29A26B00B4217D /* IgnoreSubviewModifiersPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACDE1F29A26B00B4217D /* IgnoreSubviewModifiersPreprocessor.swift */; };
9630AD051F29A26B00B4217D /* MatchPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACDF1F29A26B00B4217D /* MatchPreprocessor.swift */; };
9630AD061F29A26B00B4217D /* MotionPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACE01F29A26B00B4217D /* MotionPreprocessor.swift */; };
9630AD071F29A26B00B4217D /* SourcePreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACE11F29A26B00B4217D /* SourcePreprocessor.swift */; };
9630AD081F29A26B00B4217D /* TransitionPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9630ACE21F29A26B00B4217D /* TransitionPreprocessor.swift */; };
96328B7A1E020A41009A4C90 /* CollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96328B791E020A41009A4C90 /* CollectionViewController.swift */; };
96328B971E05C0BB009A4C90 /* TableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96328B961E05C0BB009A4C90 /* TableView.swift */; };
96328B991E05C0CE009A4C90 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96328B981E05C0CE009A4C90 /* TableViewController.swift */; };
......@@ -121,7 +123,7 @@
965E81121DD4D5C800D61E4B /* NavigationItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7921CB40DC500C806FE /* NavigationItem.swift */; };
965E81131DD4D5C800D61E4B /* NavigationDrawerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7971CB40DC500C806FE /* NavigationDrawerController.swift */; };
965E81161DD4D5C800D61E4B /* DisplayStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9626CA961DAB53A8003E2611 /* DisplayStyle.swift */; };
965E81171DD4D5C800D61E4B /* RootController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7991CB40DC500C806FE /* RootController.swift */; };
965E81171DD4D5C800D61E4B /* TransitionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7991CB40DC500C806FE /* TransitionController.swift */; };
965E81181DD4D5C800D61E4B /* Snackbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963FBEFC1D669510008F8512 /* Snackbar.swift */; };
965E81191DD4D5C800D61E4B /* SnackbarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961EFC571D738FF600E84652 /* SnackbarController.swift */; };
965E811A1DD4D5C800D61E4B /* StatusBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 967A48181D0F425A00B8CEB7 /* StatusBarController.swift */; };
......@@ -174,7 +176,7 @@
96BCB8371CB4115200C806FE /* Layout.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7811CB40DC500C806FE /* Layout.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB83B1CB4115200C806FE /* NavigationDrawerController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7971CB40DC500C806FE /* NavigationDrawerController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB83C1CB4115200C806FE /* Bar.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7981CB40DC500C806FE /* Bar.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB83D1CB4115200C806FE /* RootController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7991CB40DC500C806FE /* RootController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB83D1CB4115200C806FE /* TransitionController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7991CB40DC500C806FE /* TransitionController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB8441CB4115200C806FE /* BottomNavigationController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7581CB40DC500C806FE /* BottomNavigationController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB8461CB4115200C806FE /* NavigationBar.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7901CB40DC500C806FE /* NavigationBar.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB8471CB4115200C806FE /* NavigationController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7911CB40DC500C806FE /* NavigationController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
......@@ -195,6 +197,42 @@
96BFC1541E5E486F0075DE1F /* SpringAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 965532281E47E388005C2792 /* SpringAnimation.swift */; };
96BFC16F1E63C10A0075DE1F /* SpringAnimation.swift in Headers */ = {isa = PBXBuildFile; fileRef = 965532281E47E388005C2792 /* SpringAnimation.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D88C321C1328D800B91418 /* Material.h in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C091C1328D800B91418 /* Material.h */; settings = {ATTRIBUTES = (Public, ); }; };
96D994741F4521BB00AFD6E3 /* MotionAnimator.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527581F393C0E00E8B2AC /* MotionAnimator.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994751F4521BB00AFD6E3 /* MotionAnimatorViewContext.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527591F393C0E00E8B2AC /* MotionAnimatorViewContext.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994761F4521BB00AFD6E3 /* MotionCoreAnimationViewContext.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615275A1F393C0E00E8B2AC /* MotionCoreAnimationViewContext.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994771F4521BB00AFD6E3 /* MotionHasInsertOrder.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615275B1F393C0E00E8B2AC /* MotionHasInsertOrder.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994781F4521BB00AFD6E3 /* MotionTransitionAnimator.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615275C1F393C0E00E8B2AC /* MotionTransitionAnimator.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994791F4521BB00AFD6E3 /* MotionViewPropertyViewContext.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615275D1F393C0E00E8B2AC /* MotionViewPropertyViewContext.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9947A1F4521BB00AFD6E3 /* Motion+Array.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615275F1F393C0E00E8B2AC /* Motion+Array.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9947B1F4521BB00AFD6E3 /* Motion+CALayer.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527601F393C0E00E8B2AC /* Motion+CALayer.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9947C1F4521BB00AFD6E3 /* Motion+CAMediaTimingFunction.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527611F393C0E00E8B2AC /* Motion+CAMediaTimingFunction.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9947D1F4521BB00AFD6E3 /* Motion+CG.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527621F393C0E00E8B2AC /* Motion+CG.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9947E1F4521BB00AFD6E3 /* Motion+Obj-C.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527631F393C0E00E8B2AC /* Motion+Obj-C.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9947F1F4521BB00AFD6E3 /* Motion+UIKit.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527641F393C0E00E8B2AC /* Motion+UIKit.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994801F4521BB00AFD6E3 /* Motion+UIView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527651F393C0E00E8B2AC /* Motion+UIView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994811F4521BB00AFD6E3 /* Motion+UIViewController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527661F393C0E00E8B2AC /* Motion+UIViewController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994821F4521BB00AFD6E3 /* MotionAnimationFillMode.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527671F393C0E00E8B2AC /* MotionAnimationFillMode.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994831F4521BB00AFD6E3 /* LICENSE in Headers */ = {isa = PBXBuildFile; fileRef = 961527681F393C0E00E8B2AC /* LICENSE */; settings = {ATTRIBUTES = (Public, ); }; };
96D994841F4521BB00AFD6E3 /* Motion.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527691F393C0E00E8B2AC /* Motion.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994851F4521BB00AFD6E3 /* MotionAnimation.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615276A1F393C0E00E8B2AC /* MotionAnimation.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994861F4521BB00AFD6E3 /* MotionAnimationState.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615276B1F393C0E00E8B2AC /* MotionAnimationState.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994871F4521BB00AFD6E3 /* MotionCAAnimation.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615276C1F393C0E00E8B2AC /* MotionCAAnimation.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994881F4521BB00AFD6E3 /* MotionContext.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615276D1F393C0E00E8B2AC /* MotionContext.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994891F4521BB00AFD6E3 /* MotionController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615276E1F393C0E00E8B2AC /* MotionController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9948A1F4521BB00AFD6E3 /* MotionCoordinateSpace.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615276F1F393C0E00E8B2AC /* MotionCoordinateSpace.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9948B1F4521BB00AFD6E3 /* MotionIndependentController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527701F393C0E00E8B2AC /* MotionIndependentController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9948C1F4521BB00AFD6E3 /* MotionPlugin.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527711F393C0E00E8B2AC /* MotionPlugin.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9948D1F4521BB00AFD6E3 /* MotionSnapshotType.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527721F393C0E00E8B2AC /* MotionSnapshotType.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9948E1F4521BB00AFD6E3 /* MotionTransition.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527731F393C0E00E8B2AC /* MotionTransition.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D9948F1F4521BB00AFD6E3 /* MotionTransitionObserver.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527741F393C0E00E8B2AC /* MotionTransitionObserver.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994901F4521BB00AFD6E3 /* MotionTransitionState.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527751F393C0E00E8B2AC /* MotionTransitionState.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994911F4521BB00AFD6E3 /* CascadePreprocessor.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527771F393C0E00E8B2AC /* CascadePreprocessor.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994921F4521BB00AFD6E3 /* DurationPreprocessor.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527781F393C0E00E8B2AC /* DurationPreprocessor.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994931F4521BB00AFD6E3 /* IgnoreSubviewModifiersPreprocessor.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961527791F393C0E00E8B2AC /* IgnoreSubviewModifiersPreprocessor.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994941F4521BB00AFD6E3 /* MatchPreprocessor.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615277A1F393C0E00E8B2AC /* MatchPreprocessor.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994951F4521BB00AFD6E3 /* MotionPreprocessor.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615277B1F393C0E00E8B2AC /* MotionPreprocessor.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994961F4521BB00AFD6E3 /* SourcePreprocessor.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615277C1F393C0E00E8B2AC /* SourcePreprocessor.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D994971F4521BB00AFD6E3 /* TransitionPreprocessor.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9615277D1F393C0E00E8B2AC /* TransitionPreprocessor.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E09DC81F2287E50000B121 /* TabsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96E09DC71F2287E50000B121 /* TabsController.swift */; };
96E3C3951D3A1CC20086A024 /* IconButton.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9658F2161CD6FA4700B902C1 /* IconButton.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E3C3961D3A1CC20086A024 /* CollectionReusableView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 966ECF291CF4C20100BB0BDF /* CollectionReusableView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
......@@ -206,7 +244,47 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
961154CB1F32A7B100A78D74 /* ChipBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChipBar.swift; sourceTree = "<group>"; };
961276621DCD8B1800A7D920 /* CharacterAttribute.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CharacterAttribute.swift; sourceTree = "<group>"; };
961527541F393C0E00E8B2AC /* LICENSE.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = "<group>"; };
961527551F393C0E00E8B2AC /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
961527581F393C0E00E8B2AC /* MotionAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionAnimator.swift; sourceTree = "<group>"; };
961527591F393C0E00E8B2AC /* MotionAnimatorViewContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionAnimatorViewContext.swift; sourceTree = "<group>"; };
9615275A1F393C0E00E8B2AC /* MotionCoreAnimationViewContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionCoreAnimationViewContext.swift; sourceTree = "<group>"; };
9615275B1F393C0E00E8B2AC /* MotionHasInsertOrder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionHasInsertOrder.swift; sourceTree = "<group>"; };
9615275C1F393C0E00E8B2AC /* MotionTransitionAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionTransitionAnimator.swift; sourceTree = "<group>"; };
9615275D1F393C0E00E8B2AC /* MotionViewPropertyViewContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionViewPropertyViewContext.swift; sourceTree = "<group>"; };
9615275F1F393C0E00E8B2AC /* Motion+Array.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+Array.swift"; sourceTree = "<group>"; };
961527601F393C0E00E8B2AC /* Motion+CALayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+CALayer.swift"; sourceTree = "<group>"; };
961527611F393C0E00E8B2AC /* Motion+CAMediaTimingFunction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+CAMediaTimingFunction.swift"; sourceTree = "<group>"; };
961527621F393C0E00E8B2AC /* Motion+CG.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+CG.swift"; sourceTree = "<group>"; };
961527631F393C0E00E8B2AC /* Motion+Obj-C.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+Obj-C.swift"; sourceTree = "<group>"; };
961527641F393C0E00E8B2AC /* Motion+UIKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+UIKit.swift"; sourceTree = "<group>"; };
961527651F393C0E00E8B2AC /* Motion+UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+UIView.swift"; sourceTree = "<group>"; };
961527661F393C0E00E8B2AC /* Motion+UIViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+UIViewController.swift"; sourceTree = "<group>"; };
961527671F393C0E00E8B2AC /* MotionAnimationFillMode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionAnimationFillMode.swift; sourceTree = "<group>"; };
961527681F393C0E00E8B2AC /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
961527691F393C0E00E8B2AC /* Motion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Motion.swift; sourceTree = "<group>"; };
9615276A1F393C0E00E8B2AC /* MotionAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionAnimation.swift; sourceTree = "<group>"; };
9615276B1F393C0E00E8B2AC /* MotionAnimationState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionAnimationState.swift; sourceTree = "<group>"; };
9615276C1F393C0E00E8B2AC /* MotionCAAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionCAAnimation.swift; sourceTree = "<group>"; };
9615276D1F393C0E00E8B2AC /* MotionContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionContext.swift; sourceTree = "<group>"; };
9615276E1F393C0E00E8B2AC /* MotionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionController.swift; sourceTree = "<group>"; };
9615276F1F393C0E00E8B2AC /* MotionCoordinateSpace.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionCoordinateSpace.swift; sourceTree = "<group>"; };
961527701F393C0E00E8B2AC /* MotionIndependentController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionIndependentController.swift; sourceTree = "<group>"; };
961527711F393C0E00E8B2AC /* MotionPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionPlugin.swift; sourceTree = "<group>"; };
961527721F393C0E00E8B2AC /* MotionSnapshotType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionSnapshotType.swift; sourceTree = "<group>"; };
961527731F393C0E00E8B2AC /* MotionTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionTransition.swift; sourceTree = "<group>"; };
961527741F393C0E00E8B2AC /* MotionTransitionObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionTransitionObserver.swift; sourceTree = "<group>"; };
961527751F393C0E00E8B2AC /* MotionTransitionState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionTransitionState.swift; sourceTree = "<group>"; };
961527771F393C0E00E8B2AC /* CascadePreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CascadePreprocessor.swift; sourceTree = "<group>"; };
961527781F393C0E00E8B2AC /* DurationPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DurationPreprocessor.swift; sourceTree = "<group>"; };
961527791F393C0E00E8B2AC /* IgnoreSubviewModifiersPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IgnoreSubviewModifiersPreprocessor.swift; sourceTree = "<group>"; };
9615277A1F393C0E00E8B2AC /* MatchPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatchPreprocessor.swift; sourceTree = "<group>"; };
9615277B1F393C0E00E8B2AC /* MotionPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionPreprocessor.swift; sourceTree = "<group>"; };
9615277C1F393C0E00E8B2AC /* SourcePreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SourcePreprocessor.swift; sourceTree = "<group>"; };
9615277D1F393C0E00E8B2AC /* TransitionPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionPreprocessor.swift; sourceTree = "<group>"; };
961527B81F3A509900E8B2AC /* ChipBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChipBarController.swift; sourceTree = "<group>"; };
961E6BDE1DDA2A95004E6C93 /* Application.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Application.swift; sourceTree = "<group>"; };
961E6BE11DDA2AF3004E6C93 /* Screen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Screen.swift; sourceTree = "<group>"; };
961EFC571D738FF600E84652 /* SnackbarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SnackbarController.swift; sourceTree = "<group>"; };
......@@ -216,44 +294,6 @@
9626CB9A1DAD3D1D003E2611 /* HeightPreset.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeightPreset.swift; sourceTree = "<group>"; };
962864591D53FE3E00690B69 /* Material+UIWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Material+UIWindow.swift"; sourceTree = "<group>"; };
9628645E1D540AF300690B69 /* DynamicFontType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DynamicFontType.swift; sourceTree = "<group>"; };
9630ACB91F29A26B00B4217D /* LICENSE.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = "<group>"; };
9630ACBA1F29A26B00B4217D /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
9630ACBD1F29A26B00B4217D /* MotionAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionAnimator.swift; sourceTree = "<group>"; };
9630ACBE1F29A26B00B4217D /* MotionAnimatorViewContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionAnimatorViewContext.swift; sourceTree = "<group>"; };
9630ACBF1F29A26B00B4217D /* MotionCoreAnimationViewContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionCoreAnimationViewContext.swift; sourceTree = "<group>"; };
9630ACC01F29A26B00B4217D /* MotionHasInsertOrder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionHasInsertOrder.swift; sourceTree = "<group>"; };
9630ACC11F29A26B00B4217D /* MotionTransitionAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionTransitionAnimator.swift; sourceTree = "<group>"; };
9630ACC21F29A26B00B4217D /* MotionViewPropertyViewContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionViewPropertyViewContext.swift; sourceTree = "<group>"; };
9630ACC41F29A26B00B4217D /* Motion+Array.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+Array.swift"; sourceTree = "<group>"; };
9630ACC51F29A26B00B4217D /* Motion+CALayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+CALayer.swift"; sourceTree = "<group>"; };
9630ACC61F29A26B00B4217D /* Motion+CAMediaTimingFunction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+CAMediaTimingFunction.swift"; sourceTree = "<group>"; };
9630ACC71F29A26B00B4217D /* Motion+CG.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+CG.swift"; sourceTree = "<group>"; };
9630ACC81F29A26B00B4217D /* Motion+Obj-C.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+Obj-C.swift"; sourceTree = "<group>"; };
9630ACC91F29A26B00B4217D /* Motion+UIKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+UIKit.swift"; sourceTree = "<group>"; };
9630ACCA1F29A26B00B4217D /* Motion+UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+UIView.swift"; sourceTree = "<group>"; };
9630ACCB1F29A26B00B4217D /* Motion+UIViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Motion+UIViewController.swift"; sourceTree = "<group>"; };
9630ACCC1F29A26B00B4217D /* MotionAnimationFillMode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionAnimationFillMode.swift; sourceTree = "<group>"; };
9630ACCD1F29A26B00B4217D /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
9630ACCE1F29A26B00B4217D /* Motion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Motion.swift; sourceTree = "<group>"; };
9630ACCF1F29A26B00B4217D /* MotionAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionAnimation.swift; sourceTree = "<group>"; };
9630ACD01F29A26B00B4217D /* MotionAnimationState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionAnimationState.swift; sourceTree = "<group>"; };
9630ACD11F29A26B00B4217D /* MotionCAAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionCAAnimation.swift; sourceTree = "<group>"; };
9630ACD21F29A26B00B4217D /* MotionContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionContext.swift; sourceTree = "<group>"; };
9630ACD31F29A26B00B4217D /* MotionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionController.swift; sourceTree = "<group>"; };
9630ACD41F29A26B00B4217D /* MotionCoordinateSpace.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionCoordinateSpace.swift; sourceTree = "<group>"; };
9630ACD51F29A26B00B4217D /* MotionIndependentController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionIndependentController.swift; sourceTree = "<group>"; };
9630ACD61F29A26B00B4217D /* MotionPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionPlugin.swift; sourceTree = "<group>"; };
9630ACD71F29A26B00B4217D /* MotionSnapshotType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionSnapshotType.swift; sourceTree = "<group>"; };
9630ACD81F29A26B00B4217D /* MotionTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionTransition.swift; sourceTree = "<group>"; };
9630ACD91F29A26B00B4217D /* MotionTransitionObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionTransitionObserver.swift; sourceTree = "<group>"; };
9630ACDA1F29A26B00B4217D /* MotionTransitionState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionTransitionState.swift; sourceTree = "<group>"; };
9630ACDC1F29A26B00B4217D /* CascadePreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CascadePreprocessor.swift; sourceTree = "<group>"; };
9630ACDD1F29A26B00B4217D /* DurationPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DurationPreprocessor.swift; sourceTree = "<group>"; };
9630ACDE1F29A26B00B4217D /* IgnoreSubviewModifiersPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IgnoreSubviewModifiersPreprocessor.swift; sourceTree = "<group>"; };
9630ACDF1F29A26B00B4217D /* MatchPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatchPreprocessor.swift; sourceTree = "<group>"; };
9630ACE01F29A26B00B4217D /* MotionPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionPreprocessor.swift; sourceTree = "<group>"; };
9630ACE11F29A26B00B4217D /* SourcePreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SourcePreprocessor.swift; sourceTree = "<group>"; };
9630ACE21F29A26B00B4217D /* TransitionPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionPreprocessor.swift; sourceTree = "<group>"; };
9631A7C01D95E3AC00CFB109 /* PresenterCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresenterCard.swift; sourceTree = "<group>"; };
96328B791E020A41009A4C90 /* CollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionViewController.swift; sourceTree = "<group>"; };
96328B961E05C0BB009A4C90 /* TableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableView.swift; sourceTree = "<group>"; };
......@@ -312,7 +352,7 @@
96BCB7961CB40DC500C806FE /* SearchBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchBarController.swift; sourceTree = "<group>"; };
96BCB7971CB40DC500C806FE /* NavigationDrawerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationDrawerController.swift; sourceTree = "<group>"; };
96BCB7981CB40DC500C806FE /* Bar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Bar.swift; sourceTree = "<group>"; };
96BCB7991CB40DC500C806FE /* RootController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RootController.swift; sourceTree = "<group>"; };
96BCB7991CB40DC500C806FE /* TransitionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionController.swift; sourceTree = "<group>"; };
96BCB79A1CB40DC500C806FE /* TabBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBar.swift; sourceTree = "<group>"; };
96BCB79C1CB40DC500C806FE /* TextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = "<group>"; };
96BCB79D1CB40DC500C806FE /* TextStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextStorage.swift; sourceTree = "<group>"; };
......@@ -354,154 +394,163 @@
name = Text;
sourceTree = "<group>";
};
961E6BDD1DDA2A7E004E6C93 /* Application */ = {
961154CA1F32999000A78D74 /* Chip */ = {
isa = PBXGroup;
children = (
961E6BDE1DDA2A95004E6C93 /* Application.swift */,
961154CB1F32A7B100A78D74 /* ChipBar.swift */,
961527B81F3A509900E8B2AC /* ChipBarController.swift */,
);
name = Application;
name = Chip;
sourceTree = "<group>";
};
961E6BE01DDA2ADD004E6C93 /* Screen */ = {
961527531F393C0E00E8B2AC /* Motion */ = {
isa = PBXGroup;
children = (
961E6BE11DDA2AF3004E6C93 /* Screen.swift */,
961527541F393C0E00E8B2AC /* LICENSE.md */,
961527551F393C0E00E8B2AC /* README.md */,
961527561F393C0E00E8B2AC /* Sources */,
);
name = Screen;
path = Motion;
sourceTree = "<group>";
};
961E6BEF1DDA4B04004E6C93 /* NavigationDrawer */ = {
961527561F393C0E00E8B2AC /* Sources */ = {
isa = PBXGroup;
children = (
96BCB7971CB40DC500C806FE /* NavigationDrawerController.swift */,
961527571F393C0E00E8B2AC /* Animator */,
9615275E1F393C0E00E8B2AC /* Extensions */,
961527681F393C0E00E8B2AC /* LICENSE */,
961527691F393C0E00E8B2AC /* Motion.swift */,
9615276A1F393C0E00E8B2AC /* MotionAnimation.swift */,
9615276B1F393C0E00E8B2AC /* MotionAnimationState.swift */,
9615276C1F393C0E00E8B2AC /* MotionCAAnimation.swift */,
9615276D1F393C0E00E8B2AC /* MotionContext.swift */,
9615276E1F393C0E00E8B2AC /* MotionController.swift */,
9615276F1F393C0E00E8B2AC /* MotionCoordinateSpace.swift */,
961527701F393C0E00E8B2AC /* MotionIndependentController.swift */,
961527711F393C0E00E8B2AC /* MotionPlugin.swift */,
961527721F393C0E00E8B2AC /* MotionSnapshotType.swift */,
961527731F393C0E00E8B2AC /* MotionTransition.swift */,
961527741F393C0E00E8B2AC /* MotionTransitionObserver.swift */,
961527751F393C0E00E8B2AC /* MotionTransitionState.swift */,
961527761F393C0E00E8B2AC /* Preprocessors */,
);
name = NavigationDrawer;
path = Sources;
sourceTree = "<group>";
};
96230AB61D6A51FD00AF47DC /* Divider */ = {
961527571F393C0E00E8B2AC /* Animator */ = {
isa = PBXGroup;
children = (
96230AB71D6A520C00AF47DC /* Divider.swift */,
961527581F393C0E00E8B2AC /* MotionAnimator.swift */,
961527591F393C0E00E8B2AC /* MotionAnimatorViewContext.swift */,
9615275A1F393C0E00E8B2AC /* MotionCoreAnimationViewContext.swift */,
9615275B1F393C0E00E8B2AC /* MotionHasInsertOrder.swift */,
9615275C1F393C0E00E8B2AC /* MotionTransitionAnimator.swift */,
9615275D1F393C0E00E8B2AC /* MotionViewPropertyViewContext.swift */,
);
name = Divider;
path = Animator;
sourceTree = "<group>";
};
96264BE41D833C8400576F37 /* Bar */ = {
9615275E1F393C0E00E8B2AC /* Extensions */ = {
isa = PBXGroup;
children = (
96BCB7981CB40DC500C806FE /* Bar.swift */,
9615275F1F393C0E00E8B2AC /* Motion+Array.swift */,
961527601F393C0E00E8B2AC /* Motion+CALayer.swift */,
961527611F393C0E00E8B2AC /* Motion+CAMediaTimingFunction.swift */,
961527621F393C0E00E8B2AC /* Motion+CG.swift */,
961527631F393C0E00E8B2AC /* Motion+Obj-C.swift */,
961527641F393C0E00E8B2AC /* Motion+UIKit.swift */,
961527651F393C0E00E8B2AC /* Motion+UIView.swift */,
961527661F393C0E00E8B2AC /* Motion+UIViewController.swift */,
961527671F393C0E00E8B2AC /* MotionAnimationFillMode.swift */,
);
name = Bar;
path = Extensions;
sourceTree = "<group>";
};
9626CA951DAB5370003E2611 /* Root */ = {
961527761F393C0E00E8B2AC /* Preprocessors */ = {
isa = PBXGroup;
children = (
9626CA961DAB53A8003E2611 /* DisplayStyle.swift */,
96BCB7991CB40DC500C806FE /* RootController.swift */,
961527771F393C0E00E8B2AC /* CascadePreprocessor.swift */,
961527781F393C0E00E8B2AC /* DurationPreprocessor.swift */,
961527791F393C0E00E8B2AC /* IgnoreSubviewModifiersPreprocessor.swift */,
9615277A1F393C0E00E8B2AC /* MatchPreprocessor.swift */,
9615277B1F393C0E00E8B2AC /* MotionPreprocessor.swift */,
9615277C1F393C0E00E8B2AC /* SourcePreprocessor.swift */,
9615277D1F393C0E00E8B2AC /* TransitionPreprocessor.swift */,
);
name = Root;
path = Preprocessors;
sourceTree = "<group>";
};
9626CBCC1DADA5F1003E2611 /* Height */ = {
961E6BDD1DDA2A7E004E6C93 /* Application */ = {
isa = PBXGroup;
children = (
9626CB9A1DAD3D1D003E2611 /* HeightPreset.swift */,
961E6BDE1DDA2A95004E6C93 /* Application.swift */,
);
name = Height;
name = Application;
sourceTree = "<group>";
};
962DDD081D6FBBD0001C307C /* BottomTabBar */ = {
961E6BE01DDA2ADD004E6C93 /* Screen */ = {
isa = PBXGroup;
children = (
96BCB7581CB40DC500C806FE /* BottomNavigationController.swift */,
961E6BE11DDA2AF3004E6C93 /* Screen.swift */,
);
name = BottomTabBar;
name = Screen;
sourceTree = "<group>";
};
9630ACB71F29A26B00B4217D /* Frameworks */ = {
961E6BEF1DDA4B04004E6C93 /* NavigationDrawer */ = {
isa = PBXGroup;
children = (
9630ACB81F29A26B00B4217D /* Motion */,
96BCB7971CB40DC500C806FE /* NavigationDrawerController.swift */,
);
path = Frameworks;
name = NavigationDrawer;
sourceTree = "<group>";
};
9630ACB81F29A26B00B4217D /* Motion */ = {
96230AB61D6A51FD00AF47DC /* Divider */ = {
isa = PBXGroup;
children = (
9630ACB91F29A26B00B4217D /* LICENSE.md */,
9630ACBA1F29A26B00B4217D /* README.md */,
9630ACBB1F29A26B00B4217D /* Sources */,
96230AB71D6A520C00AF47DC /* Divider.swift */,
);
path = Motion;
name = Divider;
sourceTree = "<group>";
};
9630ACBB1F29A26B00B4217D /* Sources */ = {
96264BE41D833C8400576F37 /* Bar */ = {
isa = PBXGroup;
children = (
9630ACBC1F29A26B00B4217D /* Animator */,
9630ACC31F29A26B00B4217D /* Extensions */,
9630ACCD1F29A26B00B4217D /* LICENSE */,
9630ACCE1F29A26B00B4217D /* Motion.swift */,
9630ACCF1F29A26B00B4217D /* MotionAnimation.swift */,
9630ACD01F29A26B00B4217D /* MotionAnimationState.swift */,
9630ACD11F29A26B00B4217D /* MotionCAAnimation.swift */,
9630ACD21F29A26B00B4217D /* MotionContext.swift */,
9630ACD31F29A26B00B4217D /* MotionController.swift */,
9630ACD41F29A26B00B4217D /* MotionCoordinateSpace.swift */,
9630ACD51F29A26B00B4217D /* MotionIndependentController.swift */,
9630ACD61F29A26B00B4217D /* MotionPlugin.swift */,
9630ACD71F29A26B00B4217D /* MotionSnapshotType.swift */,
9630ACD81F29A26B00B4217D /* MotionTransition.swift */,
9630ACD91F29A26B00B4217D /* MotionTransitionObserver.swift */,
9630ACDA1F29A26B00B4217D /* MotionTransitionState.swift */,
9630ACDB1F29A26B00B4217D /* Preprocessors */,
96BCB7981CB40DC500C806FE /* Bar.swift */,
);
path = Sources;
name = Bar;
sourceTree = "<group>";
};
9630ACBC1F29A26B00B4217D /* Animator */ = {
9626CA951DAB5370003E2611 /* Transition */ = {
isa = PBXGroup;
children = (
9630ACBD1F29A26B00B4217D /* MotionAnimator.swift */,
9630ACBE1F29A26B00B4217D /* MotionAnimatorViewContext.swift */,
9630ACBF1F29A26B00B4217D /* MotionCoreAnimationViewContext.swift */,
9630ACC01F29A26B00B4217D /* MotionHasInsertOrder.swift */,
9630ACC11F29A26B00B4217D /* MotionTransitionAnimator.swift */,
9630ACC21F29A26B00B4217D /* MotionViewPropertyViewContext.swift */,
9626CA961DAB53A8003E2611 /* DisplayStyle.swift */,
96BCB7991CB40DC500C806FE /* TransitionController.swift */,
);
path = Animator;
name = Transition;
sourceTree = "<group>";
};
9630ACC31F29A26B00B4217D /* Extensions */ = {
9626CBCC1DADA5F1003E2611 /* Height */ = {
isa = PBXGroup;
children = (
9630ACC41F29A26B00B4217D /* Motion+Array.swift */,
9630ACC51F29A26B00B4217D /* Motion+CALayer.swift */,
9630ACC61F29A26B00B4217D /* Motion+CAMediaTimingFunction.swift */,
9630ACC71F29A26B00B4217D /* Motion+CG.swift */,
9630ACC81F29A26B00B4217D /* Motion+Obj-C.swift */,
9630ACC91F29A26B00B4217D /* Motion+UIKit.swift */,
9630ACCA1F29A26B00B4217D /* Motion+UIView.swift */,
9630ACCB1F29A26B00B4217D /* Motion+UIViewController.swift */,
9630ACCC1F29A26B00B4217D /* MotionAnimationFillMode.swift */,
9626CB9A1DAD3D1D003E2611 /* HeightPreset.swift */,
);
path = Extensions;
name = Height;
sourceTree = "<group>";
};
9630ACDB1F29A26B00B4217D /* Preprocessors */ = {
962DDD081D6FBBD0001C307C /* BottomTabBar */ = {
isa = PBXGroup;
children = (
9630ACDC1F29A26B00B4217D /* CascadePreprocessor.swift */,
9630ACDD1F29A26B00B4217D /* DurationPreprocessor.swift */,
9630ACDE1F29A26B00B4217D /* IgnoreSubviewModifiersPreprocessor.swift */,
9630ACDF1F29A26B00B4217D /* MatchPreprocessor.swift */,
9630ACE01F29A26B00B4217D /* MotionPreprocessor.swift */,
9630ACE11F29A26B00B4217D /* SourcePreprocessor.swift */,
9630ACE21F29A26B00B4217D /* TransitionPreprocessor.swift */,
96BCB7581CB40DC500C806FE /* BottomNavigationController.swift */,
);
path = Preprocessors;
name = BottomTabBar;
sourceTree = "<group>";
};
9630ACB71F29A26B00B4217D /* Frameworks */ = {
isa = PBXGroup;
children = (
961527531F393C0E00E8B2AC /* Motion */,
);
path = Frameworks;
sourceTree = "<group>";
};
96328B9A1E05C135009A4C90 /* Data */ = {
......@@ -617,6 +666,7 @@
962DDD081D6FBBD0001C307C /* BottomTabBar */,
96BCB8031CB40F4B00C806FE /* Button */,
96BCB8021CB40F3B00C806FE /* Card */,
961154CA1F32999000A78D74 /* Chip */,
96BCB8051CB40F9C00C806FE /* Collection */,
96BCB8001CB40F0300C806FE /* Color */,
96328B9A1E05C135009A4C90 /* Data */,
......@@ -632,7 +682,6 @@
96BCB8041CB40F6C00C806FE /* Layout */,
96BCB8011CB40F1700C806FE /* Navigation */,
961E6BEF1DDA4B04004E6C93 /* NavigationDrawer */,
9626CA951DAB5370003E2611 /* Root */,
961E6BE01DDA2ADD004E6C93 /* Screen */,
963FBF031D6696EF008F8512 /* SearchBar */,
963FBEFB1D6694E8008F8512 /* Snackbar */,
......@@ -642,6 +691,7 @@
966ECF2B1CF4C21B00BB0BDF /* Table */,
96090B031D9D709E00709CA6 /* Text */,
963FBF001D66964F008F8512 /* Toolbar */,
9626CA951DAB5370003E2611 /* Transition */,
96BCB8061CB40FD000C806FE /* Type */,
96BCB80C1CB410DD00C806FE /* View */,
);
......@@ -856,7 +906,7 @@
96BCB8371CB4115200C806FE /* Layout.swift in Headers */,
96BCB83B1CB4115200C806FE /* NavigationDrawerController.swift in Headers */,
96BCB83C1CB4115200C806FE /* Bar.swift in Headers */,
96BCB83D1CB4115200C806FE /* RootController.swift in Headers */,
96BCB83D1CB4115200C806FE /* TransitionController.swift in Headers */,
96BCB8441CB4115200C806FE /* BottomNavigationController.swift in Headers */,
96BCB8461CB4115200C806FE /* NavigationBar.swift in Headers */,
96BCB8471CB4115200C806FE /* NavigationController.swift in Headers */,
......@@ -910,6 +960,42 @@
9685D5B01F0F04CB00AFEB79 /* CardCollectionViewController.swift in Headers */,
9685D5B11F0F04CB00AFEB79 /* Material+MotionAnimation.swift in Headers */,
96F1A5531F24F17A001D8CAF /* TabsController.swift in Headers */,
96D994741F4521BB00AFD6E3 /* MotionAnimator.swift in Headers */,
96D994751F4521BB00AFD6E3 /* MotionAnimatorViewContext.swift in Headers */,
96D994761F4521BB00AFD6E3 /* MotionCoreAnimationViewContext.swift in Headers */,
96D994771F4521BB00AFD6E3 /* MotionHasInsertOrder.swift in Headers */,
96D994781F4521BB00AFD6E3 /* MotionTransitionAnimator.swift in Headers */,
96D994791F4521BB00AFD6E3 /* MotionViewPropertyViewContext.swift in Headers */,
96D9947A1F4521BB00AFD6E3 /* Motion+Array.swift in Headers */,
96D9947B1F4521BB00AFD6E3 /* Motion+CALayer.swift in Headers */,
96D9947C1F4521BB00AFD6E3 /* Motion+CAMediaTimingFunction.swift in Headers */,
96D9947D1F4521BB00AFD6E3 /* Motion+CG.swift in Headers */,
96D9947E1F4521BB00AFD6E3 /* Motion+Obj-C.swift in Headers */,
96D9947F1F4521BB00AFD6E3 /* Motion+UIKit.swift in Headers */,
96D994801F4521BB00AFD6E3 /* Motion+UIView.swift in Headers */,
96D994811F4521BB00AFD6E3 /* Motion+UIViewController.swift in Headers */,
96D994821F4521BB00AFD6E3 /* MotionAnimationFillMode.swift in Headers */,
96D994831F4521BB00AFD6E3 /* LICENSE in Headers */,
96D994841F4521BB00AFD6E3 /* Motion.swift in Headers */,
96D994851F4521BB00AFD6E3 /* MotionAnimation.swift in Headers */,
96D994861F4521BB00AFD6E3 /* MotionAnimationState.swift in Headers */,
96D994871F4521BB00AFD6E3 /* MotionCAAnimation.swift in Headers */,
96D994881F4521BB00AFD6E3 /* MotionContext.swift in Headers */,
96D994891F4521BB00AFD6E3 /* MotionController.swift in Headers */,
96D9948A1F4521BB00AFD6E3 /* MotionCoordinateSpace.swift in Headers */,
96D9948B1F4521BB00AFD6E3 /* MotionIndependentController.swift in Headers */,
96D9948C1F4521BB00AFD6E3 /* MotionPlugin.swift in Headers */,
96D9948D1F4521BB00AFD6E3 /* MotionSnapshotType.swift in Headers */,
96D9948E1F4521BB00AFD6E3 /* MotionTransition.swift in Headers */,
96D9948F1F4521BB00AFD6E3 /* MotionTransitionObserver.swift in Headers */,
96D994901F4521BB00AFD6E3 /* MotionTransitionState.swift in Headers */,
96D994911F4521BB00AFD6E3 /* CascadePreprocessor.swift in Headers */,
96D994921F4521BB00AFD6E3 /* DurationPreprocessor.swift in Headers */,
96D994931F4521BB00AFD6E3 /* IgnoreSubviewModifiersPreprocessor.swift in Headers */,
96D994941F4521BB00AFD6E3 /* MatchPreprocessor.swift in Headers */,
96D994951F4521BB00AFD6E3 /* MotionPreprocessor.swift in Headers */,
96D994961F4521BB00AFD6E3 /* SourcePreprocessor.swift in Headers */,
96D994971F4521BB00AFD6E3 /* TransitionPreprocessor.swift in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -992,37 +1078,37 @@
buildActionMask = 2147483647;
files = (
961E6BE21DDA2AF3004E6C93 /* Screen.swift in Sources */,
9630ACFD1F29A26B00B4217D /* MotionPlugin.swift in Sources */,
965E81261DD4D7C800D61E4B /* CharacterAttribute.swift in Sources */,
9630AD041F29A26B00B4217D /* IgnoreSubviewModifiersPreprocessor.swift in Sources */,
961527861F393C0E00E8B2AC /* Motion+Array.swift in Sources */,
965E80FF1DD4D5C800D61E4B /* BottomNavigationController.swift in Sources */,
965E81031DD4D5C800D61E4B /* CollectionView.swift in Sources */,
965E81041DD4D5C800D61E4B /* CollectionViewCell.swift in Sources */,
961527931F393C0E00E8B2AC /* MotionCAAnimation.swift in Sources */,
965E81071DD4D5C800D61E4B /* CollectionViewLayout.swift in Sources */,
9630ACF61F29A26B00B4217D /* MotionAnimation.swift in Sources */,
961527A31F393C0E00E8B2AC /* TransitionPreprocessor.swift in Sources */,
965E81081DD4D5C800D61E4B /* CollectionReusableView.swift in Sources */,
961527951F393C0E00E8B2AC /* MotionController.swift in Sources */,
965E81091DD4D5C800D61E4B /* DataSourceItem.swift in Sources */,
965E810A1DD4D5C800D61E4B /* Font.swift in Sources */,
965E810B1DD4D5C800D61E4B /* RobotoFont.swift in Sources */,
965E810C1DD4D5C800D61E4B /* DynamicFontType.swift in Sources */,
9630ACEF1F29A26B00B4217D /* Motion+Obj-C.swift in Sources */,
961527A11F393C0E00E8B2AC /* MotionPreprocessor.swift in Sources */,
9615279D1F393C0E00E8B2AC /* CascadePreprocessor.swift in Sources */,
96A183651E0C6DD400083C30 /* FABMenuController.swift in Sources */,
965E81101DD4D5C800D61E4B /* NavigationBar.swift in Sources */,
965E81111DD4D5C800D61E4B /* NavigationController.swift in Sources */,
965E81121DD4D5C800D61E4B /* NavigationItem.swift in Sources */,
9615278D1F393C0E00E8B2AC /* Motion+UIViewController.swift in Sources */,
965E81131DD4D5C800D61E4B /* NavigationDrawerController.swift in Sources */,
9630AD011F29A26B00B4217D /* MotionTransitionState.swift in Sources */,
9630ACE51F29A26B00B4217D /* MotionAnimator.swift in Sources */,
9630ACEB1F29A26B00B4217D /* Motion+Array.swift in Sources */,
9656895F1F002F16001C656D /* CardCollectionViewCell.swift in Sources */,
9630ACF11F29A26B00B4217D /* Motion+UIView.swift in Sources */,
965E81161DD4D5C800D61E4B /* DisplayStyle.swift in Sources */,
965E81171DD4D5C800D61E4B /* RootController.swift in Sources */,
961527921F393C0E00E8B2AC /* MotionAnimationState.swift in Sources */,
965E81171DD4D5C800D61E4B /* TransitionController.swift in Sources */,
965E81181DD4D5C800D61E4B /* Snackbar.swift in Sources */,
9630AD021F29A26B00B4217D /* CascadePreprocessor.swift in Sources */,
965E81191DD4D5C800D61E4B /* SnackbarController.swift in Sources */,
961527811F393C0E00E8B2AC /* MotionAnimatorViewContext.swift in Sources */,
965E811A1DD4D5C800D61E4B /* StatusBarController.swift in Sources */,
9630ACED1F29A26B00B4217D /* Motion+CAMediaTimingFunction.swift in Sources */,
961527871F393C0E00E8B2AC /* Motion+CALayer.swift in Sources */,
965E811B1DD4D5C800D61E4B /* Switch.swift in Sources */,
965E811C1DD4D5C800D61E4B /* TabBar.swift in Sources */,
965E811D1DD4D5C800D61E4B /* TableViewCell.swift in Sources */,
......@@ -1032,76 +1118,78 @@
965E81221DD4D5C800D61E4B /* TextView.swift in Sources */,
965E80E71DD4C55200D61E4B /* Material+UIView.swift in Sources */,
965E80E81DD4C55200D61E4B /* Material+CALayer.swift in Sources */,
9630ACEA1F29A26B00B4217D /* MotionViewPropertyViewContext.swift in Sources */,
965E80E91DD4C55200D61E4B /* Material+String.swift in Sources */,
965E80F71DD4D59500D61E4B /* Card.swift in Sources */,
9615279E1F393C0E00E8B2AC /* DurationPreprocessor.swift in Sources */,
965E80EA1DD4C55200D61E4B /* Material+UIFont.swift in Sources */,
9615278A1F393C0E00E8B2AC /* Motion+Obj-C.swift in Sources */,
965E80EB1DD4C55200D61E4B /* Material+UIImage.swift in Sources */,
9615279C1F393C0E00E8B2AC /* MotionTransitionState.swift in Sources */,
965E80EC1DD4C55200D61E4B /* Material+Array.swift in Sources */,
965E80ED1DD4C55200D61E4B /* Material+UIWindow.swift in Sources */,
9630AD001F29A26B00B4217D /* MotionTransitionObserver.swift in Sources */,
9630AD031F29A26B00B4217D /* DurationPreprocessor.swift in Sources */,
961527B91F3A509900E8B2AC /* ChipBarController.swift in Sources */,
965E80E41DD4C53300D61E4B /* PulseView.swift in Sources */,
966C17731F0439F600D3E83C /* Material+MotionAnimation.swift in Sources */,
961527841F393C0E00E8B2AC /* MotionTransitionAnimator.swift in Sources */,
965E80E51DD4C53300D61E4B /* PulseAnimation.swift in Sources */,
965E80FE1DD4D59500D61E4B /* ToolbarController.swift in Sources */,
96328B971E05C0BB009A4C90 /* TableView.swift in Sources */,
965E80F81DD4D59500D61E4B /* ImageCard.swift in Sources */,
9615279B1F393C0E00E8B2AC /* MotionTransitionObserver.swift in Sources */,
961527821F393C0E00E8B2AC /* MotionCoreAnimationViewContext.swift in Sources */,
96328B991E05C0CE009A4C90 /* TableViewController.swift in Sources */,
961527851F393C0E00E8B2AC /* MotionViewPropertyViewContext.swift in Sources */,
961527891F393C0E00E8B2AC /* Motion+CG.swift in Sources */,
965E80F91DD4D59500D61E4B /* PresenterCard.swift in Sources */,
9615278E1F393C0E00E8B2AC /* MotionAnimationFillMode.swift in Sources */,
9615278C1F393C0E00E8B2AC /* Motion+UIView.swift in Sources */,
961527961F393C0E00E8B2AC /* MotionCoordinateSpace.swift in Sources */,
96E09DC81F2287E50000B121 /* TabsController.swift in Sources */,
961154CC1F32A7B100A78D74 /* ChipBar.swift in Sources */,
961527941F393C0E00E8B2AC /* MotionContext.swift in Sources */,
965689611F002F4C001C656D /* CardCollectionViewController.swift in Sources */,
9630ACFF1F29A26B00B4217D /* MotionTransition.swift in Sources */,
965E80CC1DD4C50600D61E4B /* Bar.swift in Sources */,
961527901F393C0E00E8B2AC /* Motion.swift in Sources */,
965E80CD1DD4C50600D61E4B /* Button.swift in Sources */,
965E80CE1DD4C50600D61E4B /* FABButton.swift in Sources */,
9630ACEE1F29A26B00B4217D /* Motion+CG.swift in Sources */,
9630ACF21F29A26B00B4217D /* Motion+UIViewController.swift in Sources */,
9630ACF81F29A26B00B4217D /* MotionCAAnimation.swift in Sources */,
965E80CF1DD4C50600D61E4B /* FlatButton.swift in Sources */,
965E80D01DD4C50600D61E4B /* RaisedButton.swift in Sources */,
9630ACFA1F29A26B00B4217D /* MotionController.swift in Sources */,
961527831F393C0E00E8B2AC /* MotionHasInsertOrder.swift in Sources */,
96A183631E0C6CE200083C30 /* FABMenu.swift in Sources */,
965E80D11DD4C50600D61E4B /* IconButton.swift in Sources */,
9630ACF51F29A26B00B4217D /* Motion.swift in Sources */,
9630ACE71F29A26B00B4217D /* MotionCoreAnimationViewContext.swift in Sources */,
965E80D21DD4C50600D61E4B /* Color.swift in Sources */,
96BFC1541E5E486F0075DE1F /* SpringAnimation.swift in Sources */,
965E80D31DD4C50600D61E4B /* Device.swift in Sources */,
965E80FD1DD4D59500D61E4B /* Toolbar.swift in Sources */,
9630AD081F29A26B00B4217D /* TransitionPreprocessor.swift in Sources */,
9630ACFC1F29A26B00B4217D /* MotionIndependentController.swift in Sources */,
9630AD061F29A26B00B4217D /* MotionPreprocessor.swift in Sources */,
9630ACE81F29A26B00B4217D /* MotionHasInsertOrder.swift in Sources */,
965E80D41DD4C50600D61E4B /* Divider.swift in Sources */,
961527971F393C0E00E8B2AC /* MotionIndependentController.swift in Sources */,
965E80D51DD4C50600D61E4B /* Grid.swift in Sources */,
9630ACF71F29A26B00B4217D /* MotionAnimationState.swift in Sources */,
9630AD051F29A26B00B4217D /* MatchPreprocessor.swift in Sources */,
965E80D61DD4C50600D61E4B /* HeightPreset.swift in Sources */,
961527A01F393C0E00E8B2AC /* MatchPreprocessor.swift in Sources */,
9615278B1F393C0E00E8B2AC /* Motion+UIKit.swift in Sources */,
961E6BDF1DDA2A95004E6C93 /* Application.swift in Sources */,
965E80D71DD4C50600D61E4B /* Icon.swift in Sources */,
9630ACF91F29A26B00B4217D /* MotionContext.swift in Sources */,
9630AD071F29A26B00B4217D /* SourcePreprocessor.swift in Sources */,
9630ACEC1F29A26B00B4217D /* Motion+CALayer.swift in Sources */,
965E80FC1DD4D59500D61E4B /* SearchBarController.swift in Sources */,
965E80D81DD4C50600D61E4B /* Layer.swift in Sources */,
961527A21F393C0E00E8B2AC /* SourcePreprocessor.swift in Sources */,
965E80D91DD4C50600D61E4B /* Layout.swift in Sources */,
965E80DA1DD4C50600D61E4B /* Border.swift in Sources */,
965E80DB1DD4C50600D61E4B /* InterimSpace.swift in Sources */,
961527881F393C0E00E8B2AC /* Motion+CAMediaTimingFunction.swift in Sources */,
965E80DC1DD4C50600D61E4B /* Depth.swift in Sources */,
961527991F393C0E00E8B2AC /* MotionSnapshotType.swift in Sources */,
965E80DD1DD4C50600D61E4B /* EdgeInsets.swift in Sources */,
9630ACFE1F29A26B00B4217D /* MotionSnapshotType.swift in Sources */,
965E80DE1DD4C50600D61E4B /* Gravity.swift in Sources */,
9630ACF31F29A26B00B4217D /* MotionAnimationFillMode.swift in Sources */,
9630ACF01F29A26B00B4217D /* Motion+UIKit.swift in Sources */,
965E80DF1DD4C50600D61E4B /* CornerRadius.swift in Sources */,
965E80FB1DD4D59500D61E4B /* SearchBar.swift in Sources */,
965E80E01DD4C50600D61E4B /* Shape.swift in Sources */,
965E80E11DD4C50600D61E4B /* Offset.swift in Sources */,
961527981F393C0E00E8B2AC /* MotionPlugin.swift in Sources */,
961527801F393C0E00E8B2AC /* MotionAnimator.swift in Sources */,
965E80E21DD4C50600D61E4B /* View.swift in Sources */,
9630ACE91F29A26B00B4217D /* MotionTransitionAnimator.swift in Sources */,
9630ACE61F29A26B00B4217D /* MotionAnimatorViewContext.swift in Sources */,
9630ACFB1F29A26B00B4217D /* MotionCoordinateSpace.swift in Sources */,
961527911F393C0E00E8B2AC /* MotionAnimation.swift in Sources */,
9615279A1F393C0E00E8B2AC /* MotionTransition.swift in Sources */,
9615279F1F393C0E00E8B2AC /* IgnoreSubviewModifiersPreprocessor.swift in Sources */,
96328B7A1E020A41009A4C90 /* CollectionViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......
......@@ -10,7 +10,7 @@
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "0F44C283-777E-4E3F-9E10-FC52C3C270CE",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"9CF35BC641478FBD765F7442D4034ED362261E0A" : "Material\/",
"0F3E254D46E5A5B90D1542854F510B7D145A9F31" : "Material\/Frameworks\/Motion\/"
"0F3E254D46E5A5B90D1542854F510B7D145A9F31" : "Material\/Sources\/Frameworks\/Motion\/"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "Material",
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
......
......@@ -4,14 +4,20 @@
Welcome to **Material,** a Material Design library used to create beautiful applications. Material's animation system has been completely reworked to take advantage of [Motion](https://github.com/CosmicMind/Motion), a library dedicated to animations and transitions.
[![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Version](https://img.shields.io/cocoapods/v/Material.svg?style=flat)](http://cocoapods.org/pods/Material)
[![License](https://img.shields.io/cocoapods/l/Material.svg?style=flat)](https://github.com/lkzhao/Material/blob/master/LICENSE?raw=true)
![Xcode 8.2+](https://img.shields.io/badge/Xcode-8.2%2B-blue.svg)
![iOS 8.0+](https://img.shields.io/badge/iOS-8.0%2B-blue.svg)
![Swift 3.0+](https://img.shields.io/badge/Swift-3.0%2B-orange.svg)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9D6MURMLLUNQ2)
## Photos Sample
Take a look at a sample [Photos](https://github.com/CosmicMind/Samples/tree/master/Projects/Programmatic/Photos) project to get started.
![Photos](http://www.cosmicmind.com/motion/projects/photos.gif)
* [Photos Sample](https://github.com/CosmicMind/Samples/tree/master/Projects/Programmatic/Photos)
## Sample Projects
Take a look at [Sample Projects](https://github.com/CosmicMind/Samples) to get your projects started.
......@@ -27,8 +33,8 @@ Take a look at [Sample Projects](https://github.com/CosmicMind/Samples) to get y
- [x] Icons
- [x] TextField
- [X] Snackbar
- [x] TabBar
- [x] Tabs
- [x] Chips
- [X] SearchBar
- [x] NavigationController
- [x] NavigationDrawer
......@@ -150,7 +156,7 @@ A SearchBar is a powerful navigation tool that allows for user's input with an i
## Tabs
Tabs is a new component that links a customizable TabBar to a stack of view controllers making a powerful and visually pleasing component to have in any application. The TabBar can be aligned at the top or bottom of the view controller.
Tabs is a new component that links a customizable TabBar to a stack of view controllers making a powerful and visually pleasing component to have in any application.
![Tabs](http://www.cosmicmind.com/material/white/page-tab-bar-controller.gif)
......
......@@ -12,13 +12,13 @@ Take a look at a sample [Photos](https://github.com/CosmicMind/Samples/tree/mast
* [Photos Sample](https://github.com/CosmicMind/Samples/tree/master/Projects/Programmatic/Photos)
### Who is this for?
### Who is Motion for?
Motion is designed for beginner to expert developers. For beginners, you will be exposed to very powerful APIs that would take time and experience to develop on your own, and experts will appreciate the time saved by using Motion.
### What you will learn
You will learn how to use Motion with a general introduction to fundamental concepts and easy to use code snippets.
You will learn how to use Motion with a general introduction to fundamental concepts and easy to use code snippets.
# Transitions
......@@ -48,7 +48,7 @@ orangeView.motionIdentifier = "bar"
orangeView.transition(.translate(x: -100))
```
The above code snippet tells the source views in `view controller 1` to link to the destination views in `view controller 2` using the `motionIdentifier`. Animations may be added to views during a transition using the **transition** method. The *transition* method accepts MotionTransition structs that configure the view's animation.
The above code snippet tells the source views in `view controller 1` to link to the destination views in `view controller 2` using the `motionIdentifier`. Animations may be added to views during a transition using the **transition** method. The *transition* method accepts MotionTransition structs that configure the view's animation.
* [MotionTransition API](https://cosmicmind.gitbooks.io/motion/content/motion_transition_api.html)
* [Code Samples](https://github.com/CosmicMind/Samples/tree/master/Projects/Programmatic/TransitionsWithIdentifier)
......@@ -84,7 +84,7 @@ motionNavigationTransitionType = .autoReverse(presenting: .zoom)
```
* [Code Samples](https://github.com/CosmicMind/Samples/tree/master/Projects/Programmatic/Transitions)
# Animations
Motion provides the building blocks necessary to create stunning animations without much effort. Motion's animation API will make maintenance a breeze and changes even easier. To create an animation, use the **animate** method of a view or layer and pass in a list of MotionAnimation structs. MotionAnimation structs are configurable values that describe how to animate a property or group of properties.
......
......@@ -25,22 +25,22 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import UIKit
public extension CAMediaTimingFunction {
// default
// Default
static let linear = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
static let easeIn = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn)
static let easeOut = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
static let easeInOut = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
// material
// Material
static let standard = CAMediaTimingFunction(controlPoints: 0.4, 0.0, 0.2, 1.0)
static let deceleration = CAMediaTimingFunction(controlPoints: 0.0, 0.0, 0.2, 1)
static let acceleration = CAMediaTimingFunction(controlPoints: 0.4, 0.0, 1, 1)
static let sharp = CAMediaTimingFunction(controlPoints: 0.4, 0.0, 0.6, 1)
// easing.net
// Easing.net
static let easeOutBack = CAMediaTimingFunction(controlPoints: 0.175, 0.885, 0.32, 1.75)
}
......@@ -31,7 +31,7 @@ internal struct AssociatedObject {
- Parameter initializer: Object initializer.
- Returns: The associated reference for the initializer object.
*/
public static func get<T: Any>(base: Any, key: UnsafePointer<UInt8>, initializer: () -> T) -> T {
static func get<T: Any>(base: Any, key: UnsafePointer<UInt8>, initializer: () -> T) -> T {
if let v = objc_getAssociatedObject(base, key) as? T {
return v
}
......@@ -48,7 +48,7 @@ internal struct AssociatedObject {
- Parameter value: The object instance to set for the associated object.
- Returns: The associated reference for the initializer object.
*/
public static func set<T: Any>(base: Any, key: UnsafePointer<UInt8>, value: T) {
static func set<T: Any>(base: Any, key: UnsafePointer<UInt8>, value: T) {
objc_setAssociatedObject(base, key, value, .OBJC_ASSOCIATION_RETAIN)
}
}
......@@ -111,13 +111,13 @@ public protocol MotionViewControllerDelegate {
/**
### The singleton class/object for controlling interactive transitions.
```swift
Motion.shared
```
#### Use the following methods for controlling the interactive transition:
```swift
func update(progress:Double)
func end()
......@@ -128,16 +128,16 @@ public protocol MotionViewControllerDelegate {
public class Motion: MotionController {
/// Shared singleton object for controlling the transition
public static let shared = Motion()
/// Source view controller.
public internal(set) var fromViewController: UIViewController?
/// Destination view controller.
public internal(set) var toViewController: UIViewController?
/// Whether or not we are presenting the destination view controller.
public internal(set) var isPresenting = true
/// Progress of the current transition, 0 if a transition is not happening.
public override var elapsedTime: TimeInterval {
didSet {
......@@ -148,22 +148,22 @@ public class Motion: MotionController {
transitionContext?.updateInteractiveTransition(CGFloat(elapsedTime))
}
}
/// Indicates whether the transition is animating or not.
public var isAnimating = false
/**
A UIViewControllerContextTransitioning object provided by UIKit, which
might be nil when isTransitioning. This happens when calling motionReplaceViewController
*/
internal weak var transitionContext: UIViewControllerContextTransitioning?
/// A reference to a fullscreen snapshot.
internal var fullScreenSnapshot: UIView!
/// Default animation type.
internal var defaultAnimation = MotionTransitionType.auto
/// The color of the transitioning container.
internal var containerBackgroundColor: UIColor?
......@@ -173,16 +173,16 @@ public class Motion: MotionController {
UINavigationController.setViewControllers not able to handle interactive transitions.
*/
internal var forceNonInteractive = false
/// Inserts the toViews first.
internal var insertToViewFirst = false
/// Indicates whether a UINavigationController is transitioning.
internal var isNavigationController = false
/// Indicates whether a UITabBarController is transitioning.
internal var isTabBarController = false
/// Indicates whether a UINavigationController or UITabBarController is transitioning.
internal var isContainerController: Bool {
return isNavigationController || isTabBarController
......@@ -205,7 +205,7 @@ public class Motion: MotionController {
return !isContainerController && (.overFullScreen == v.modalPresentationStyle || .overCurrentContext == v.modalPresentationStyle)
}
/// A reference to the fromView, fromViewController.view.
internal var fromView: UIView? {
return fromViewController?.view
......@@ -215,7 +215,7 @@ public class Motion: MotionController {
internal var toView: UIView? {
return toViewController?.view
}
/// An initializer.
internal override init() {
super.init()
......@@ -236,7 +236,7 @@ public extension Motion {
func setAnimationForNextTransition(_ animation: MotionTransitionType) {
defaultAnimation = animation
}
/**
Set the container background color for the next transition.
- Parameter _ color: An optional UIColor.
......@@ -305,7 +305,7 @@ internal extension Motion {
context.clean()
if isFinished && isPresenting && toOverFullScreen {
// finished presenting a overFullScreen VC
// finished presenting a overFullScreen view controller.
context.unhide(rootView: tv)
context.removeSnapshots(rootView: tv)
context.storeViewAlpha(rootView: fv)
......@@ -314,7 +314,7 @@ internal extension Motion {
fv.removeFromSuperview()
fv.addSubview(c)
} else if !isFinished && !isPresenting && fromOverFullScreen {
// cancelled dismissing a overFullScreen VC
// Cancelled dismissing a overFullScreen view controller.
context.unhide(rootView: fv)
context.removeSnapshots(rootView: fv)
context.storeViewAlpha(rootView: tv)
......@@ -328,7 +328,7 @@ internal extension Motion {
c.removeFromSuperview()
}
// move fromView & toView back from our container back to the one supplied by UIKit
// Move fromView & toView back from our container back to the one supplied by UIKit.
if (toOverFullScreen && isFinished) || (fromOverFullScreen && !isFinished) {
tc.addSubview(isFinished ? fv : tv)
}
......@@ -336,7 +336,7 @@ internal extension Motion {
tc.addSubview(isFinished ? tv : fv)
if isPresenting != isFinished, !isContainerController {
// only happens when present a .overFullScreen VC
// Only happens when present a .overFullScreen view controller.
// bug: http://openradar.appspot.com/radar?id=5320103646199808
UIApplication.shared.keyWindow!.addSubview(isPresenting ? fv : tv)
}
......@@ -418,8 +418,9 @@ fileprivate extension Motion {
}
context.loadViewAlpha(rootView: tv)
context.loadViewAlpha(rootView: fv)
v.addSubview(tv)
context.loadViewAlpha(rootView: fv)
v.addSubview(fv)
}
......@@ -540,11 +541,11 @@ fileprivate extension Motion {
guard let s = self else {
return
}
$0.motion?(motion: s, didEndTransitionTo: tvc)
$0.motionDidEndTransition?(motion: s)
}
processForMotionDelegate(viewController: tvc) { [weak self] in
guard let s = self else {
return
......@@ -620,7 +621,7 @@ internal extension Motion {
/**
A helper transition function.
- Parameter from: A UIViewController.
- Parameter to: A UIViewController.
- Parameter to: A UIViewController.
- Parameter in view: A UIView.
- Parameter completion: An optional completion handler.
*/
......@@ -654,7 +655,7 @@ internal extension Motion {
let delegate = v.topViewController as? MotionViewControllerDelegate {
execute(delegate)
}
if let v = viewController as? UITabBarController,
let delegate = v.viewControllers?[v.selectedIndex] as? MotionViewControllerDelegate {
execute(delegate)
......
......@@ -166,7 +166,7 @@ public extension MotionContext {
if let v = viewToSnapshot[view] {
return v
}
var containerView = container
let coordinateSpace = viewToTargetState[view]?.coordinateSpace ?? defaultCoordinateSpace
......@@ -311,7 +311,6 @@ public extension MotionContext {
let nextSiblings = siblingViews[siblingViews.index(of: pairedView)!+1..<siblingViews.count]
containerView.addSubview(pairedSnapshot)
containerView.addSubview(snapshot)
for subview in pairedView.subviews {
insertGlobalViewTree(view: subview)
......@@ -320,9 +319,6 @@ public extension MotionContext {
for sibling in nextSiblings {
insertGlobalViewTree(view: sibling)
}
} else {
containerView.addSubview(snapshot)
}
containerView.addSubview(snapshot)
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.8.1</string>
<string>2.9.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -31,17 +31,22 @@
import UIKit
public struct Application {
/// A reference to the main UIWindow.
/// An optional reference to the main UIWindow.
public static var keyWindow: UIWindow? {
return UIApplication.shared.keyWindow
}
/// A Boolean indicating if the device is in Landscape mode.
/// An optional reference to the top most view controller.
public static var rootViewController: UIViewController? {
return keyWindow?.rootViewController
}
/// A boolean indicating if the device is in Landscape mode.
public static var isLandscape: Bool {
return UIApplication.shared.statusBarOrientation.isLandscape
}
/// A Boolean indicating if the device is in Portrait mode.
/// A boolean indicating if the device is in Portrait mode.
public static var isPortrait: Bool {
return !isLandscape
}
......
......@@ -265,6 +265,7 @@ open class Bar: View {
autoresizingMask = .flexibleWidth
interimSpacePreset = .interimSpace3
contentEdgeInsetsPreset = .square1
prepareContentView()
}
}
......
......@@ -130,19 +130,20 @@ open class BottomNavigationController: UITabBarController {
when subclassing.
*/
open func prepare() {
view.backgroundColor = .white
view.clipsToBounds = true
view.contentScaleFactor = Screen.scale
view.backgroundColor = .white
view.contentScaleFactor = Screen.scale
prepareTabBar()
}
}
extension BottomNavigationController {
fileprivate extension BottomNavigationController {
/// Prepares the tabBar.
fileprivate func prepareTabBar() {
func prepareTabBar() {
tabBar.isTranslucent = false
tabBar.heightPreset = .normal
tabBar.depthPreset = .depth1
tabBar.dividerColor = Color.grey.lighten3
tabBar.dividerAlignment = .top
let image = UIImage()
......
......@@ -228,7 +228,7 @@ open class Card: PulseView {
if 0 == h || nil != view as? UILabel {
(view as? UILabel)?.sizeToFit()
h = view.sizeThatFits(CGSize(width: w, height: CGFloat.greatestFiniteMagnitude)).height
h = view.sizeThatFits(CGSize(width: w, height: .greatestFiniteMagnitude)).height
}
view.width = w
......
......@@ -108,7 +108,7 @@ extension NSMutableAttributedString {
- Parameter value: Any type.
- Parameter range: A NSRange.
*/
open func addAttribute(characterAttribute: CharacterAttribute, value: Any, range: NSRange) {
open func add(characterAttribute: CharacterAttribute, value: Any, range: NSRange) {
addAttribute(CharacterAttributeToValue(attribute: characterAttribute), value: value, range: range)
}
......@@ -117,9 +117,9 @@ extension NSMutableAttributedString {
- Parameter characterAttributes: A Dictionary of CharacterAttribute type keys and Any type values.
- Parameter range: A NSRange.
*/
open func addAttributes(characterAttributes: [CharacterAttribute: Any], range: NSRange) {
open func add(characterAttributes: [CharacterAttribute: Any], range: NSRange) {
for (k, v) in characterAttributes {
addAttribute(characterAttribute: k, value: v, range: range)
add(characterAttribute: k, value: v, range: range)
}
}
......@@ -129,9 +129,9 @@ extension NSMutableAttributedString {
- Parameter value: Any type.
- Parameter range: A NSRange.
*/
open func updateAttribute(characterAttribute: CharacterAttribute, value: Any, range: NSRange) {
removeAttribute(characterAttribute: characterAttribute, range: range)
addAttribute(characterAttribute: characterAttribute, value: value, range: range)
open func update(characterAttribute: CharacterAttribute, value: Any, range: NSRange) {
remove(characterAttribute: characterAttribute, range: range)
add(characterAttribute: characterAttribute, value: value, range: range)
}
/**
......@@ -139,9 +139,9 @@ extension NSMutableAttributedString {
- Parameter characterAttributes: A Dictionary of CharacterAttribute type keys and Any type values.
- Parameter range: A NSRange.
*/
open func updateAttributes(characterAttributes: [CharacterAttribute: Any], range: NSRange) {
open func update(characterAttributes: [CharacterAttribute: Any], range: NSRange) {
for (k, v) in characterAttributes {
updateAttribute(characterAttribute: k, value: v, range: range)
update(characterAttribute: k, value: v, range: range)
}
}
......@@ -150,7 +150,7 @@ extension NSMutableAttributedString {
- Parameter characterAttribute: A CharacterAttribute.
- Parameter range: A NSRange.
*/
open func removeAttribute(characterAttribute: CharacterAttribute, range: NSRange) {
open func remove(characterAttribute: CharacterAttribute, range: NSRange) {
removeAttribute(CharacterAttributeToValue(attribute: characterAttribute), range: range)
}
......@@ -159,9 +159,9 @@ extension NSMutableAttributedString {
- Parameter characterAttributes: An Array of CharacterAttributes.
- Parameter range: A NSRange.
*/
open func removeAttributes(characterAttributes: [CharacterAttribute], range: NSRange) {
open func remove(characterAttributes: [CharacterAttribute], range: NSRange) {
for k in characterAttributes {
removeAttribute(characterAttribute: k, range: range)
remove(characterAttribute: k, range: range)
}
}
}
/*
* Copyright (C) 2015 - 2017, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.com>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of CosmicMind nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import UIKit
@objc(ChipItemStyle)
public enum ChipItemStyle: Int {
case pill
}
open class ChipItem: FlatButton {
/// Configures the visual display of the chip.
var chipItemStyle: ChipItemStyle {
get {
return associatedInstance.chipItemStyle
}
set(value) {
associatedInstance.chipItemStyle = value
layoutSubviews()
}
}
open override func layoutSubviews() {
super.layoutSubviews()
layoutChipItemStyle()
}
open override func prepare() {
super.prepare()
pulseAnimation = .none
}
}
fileprivate extension ChipItem {
/// Lays out the chipItem based on its style.
func layoutChipItemStyle() {
if .pill == chipItemStyle {
cornerRadius = height / 2
}
}
}
fileprivate struct AssociatedInstance {
/// A ChipItemStyle value.
var chipItemStyle: ChipItemStyle
}
/// A memory reference to the ChipItemStyle instance for ChipItem extensions.
fileprivate var ChipKey: UInt8 = 0
fileprivate extension ChipItem {
/// AssociatedInstance reference.
var associatedInstance: AssociatedInstance {
get {
return AssociatedObject.get(base: self, key: &ChipKey) {
return AssociatedInstance(chipItemStyle: .pill)
}
}
set(value) {
AssociatedObject.set(base: self, key: &ChipKey, value: value)
}
}
}
@objc(ChipBarDelegate)
public protocol ChipBarDelegate {
/**
A delegation method that is executed when the chipItem will trigger the
animation to the next chip.
- Parameter chipBar: A ChipBar.
- Parameter chipItem: A ChipItem.
*/
@objc
optional func chipBar(chipBar: ChipBar, willSelect chipItem: ChipItem)
/**
A delegation method that is executed when the chipItem did complete the
animation to the next chip.
- Parameter chipBar: A ChipBar.
- Parameter chipItem: A ChipItem.
*/
@objc
optional func chipBar(chipBar: ChipBar, didSelect chipItem: ChipItem)
}
@objc(ChipBarStyle)
public enum ChipBarStyle: Int {
case auto
case nonScrollable
case scrollable
}
open class ChipBar: Bar {
/// The total width of the chipItems.
fileprivate var chipItemsTotalWidth: CGFloat {
var w: CGFloat = 0
let q = 2 * chipItemsInterimSpace
let p = q + chipItemsInterimSpace
for v in chipItems {
let x = v.sizeThatFits(CGSize(width: .greatestFiniteMagnitude, height: scrollView.height)).width
w += x
w += p
}
w -= chipItemsInterimSpace
return w
}
/// An enum that determines the chip bar style.
open var chipBarStyle = ChipBarStyle.auto {
didSet {
layoutSubviews()
}
}
/// A reference to the scroll view when the chip bar style is scrollable.
open let scrollView = UIScrollView()
/// Enables and disables bouncing when swiping.
open var isScrollBounceEnabled: Bool {
get {
return scrollView.bounces
}
set(value) {
scrollView.bounces = value
}
}
/// A delegation reference.
open weak var delegate: ChipBarDelegate?
/// The currently selected chipItem.
open fileprivate(set) var selectedChipItem: ChipItem?
/// A preset wrapper around chipItems contentEdgeInsets.
open var chipItemsContentEdgeInsetsPreset: EdgeInsetsPreset {
get {
return contentView.grid.contentEdgeInsetsPreset
}
set(value) {
contentView.grid.contentEdgeInsetsPreset = value
}
}
/// A reference to EdgeInsets.
@IBInspectable
open var chipItemsContentEdgeInsets: EdgeInsets {
get {
return contentView.grid.contentEdgeInsets
}
set(value) {
contentView.grid.contentEdgeInsets = value
}
}
/// A preset wrapper around chipItems interimSpace.
open var chipItemsInterimSpacePreset: InterimSpacePreset {
get {
return contentView.grid.interimSpacePreset
}
set(value) {
contentView.grid.interimSpacePreset = value
}
}
/// A wrapper around chipItems interimSpace.
@IBInspectable
open var chipItemsInterimSpace: InterimSpace {
get {
return contentView.grid.interimSpace
}
set(value) {
contentView.grid.interimSpace = value
}
}
/// Buttons.
open var chipItems = [ChipItem]() {
didSet {
for b in oldValue {
b.removeFromSuperview()
}
prepareChipItems()
layoutSubviews()
}
}
open override func layoutSubviews() {
super.layoutSubviews()
guard willLayout else {
return
}
layoutScrollView()
updateScrollView()
}
open override func prepare() {
super.prepare()
interimSpacePreset = .interimSpace3
contentEdgeInsetsPreset = .square1
chipItemsInterimSpacePreset = .interimSpace4
chipItemsContentEdgeInsetsPreset = .square2
chipItemsContentEdgeInsets.left = 0
chipItemsContentEdgeInsets.right = 0
prepareContentView()
prepareScrollView()
prepareDivider()
}
}
fileprivate extension ChipBar {
/// Prepares the divider.
func prepareDivider() {
dividerColor = Color.grey.lighten3
}
/// Prepares the chipItems.
func prepareChipItems() {
for v in chipItems {
v.grid.columns = 0
v.cornerRadius = 0
v.contentEdgeInsets = .zero
v.removeTarget(self, action: #selector(handle(chipItem:)), for: .touchUpInside)
v.addTarget(self, action: #selector(handle(chipItem:)), for: .touchUpInside)
}
}
/// Prepares the contentView.
func prepareContentView() {
contentView.zPosition = 6000
}
/// Prepares the scroll view.
func prepareScrollView() {
scrollView.showsVerticalScrollIndicator = false
scrollView.showsHorizontalScrollIndicator = false
centerViews = [scrollView]
}
}
fileprivate extension ChipBar {
/// Layout the scrollView.
func layoutScrollView() {
contentView.grid.reload()
if .scrollable == chipBarStyle || (.auto == chipBarStyle && chipItemsTotalWidth > scrollView.width) {
var w: CGFloat = 0
let q = 2 * chipItemsInterimSpace
let p = q + chipItemsInterimSpace
for v in chipItems {
let x = v.sizeThatFits(CGSize(width: .greatestFiniteMagnitude, height: scrollView.height)).width
v.height = scrollView.height
v.width = x + q
v.x = w
w += x
w += p
if scrollView != v.superview {
v.removeFromSuperview()
scrollView.addSubview(v)
}
}
w -= chipItemsInterimSpace
scrollView.contentSize = CGSize(width: w, height: scrollView.height)
} else {
scrollView.grid.begin()
scrollView.grid.views = chipItems
scrollView.grid.axis.columns = chipItems.count
scrollView.grid.contentEdgeInsets = chipItemsContentEdgeInsets
scrollView.grid.interimSpace = chipItemsInterimSpace
scrollView.grid.commit()
scrollView.contentSize = scrollView.frame.size
}
}
}
fileprivate extension ChipBar {
/// Handles the chipItem touch event.
@objc
func handle(chipItem: ChipItem) {
animate(to: chipItem, isTriggeredByUserInteraction: true)
}
}
extension ChipBar {
/**
Selects a given index from the chipItems array.
- Parameter at index: An Int.
- Paramater completion: An optional completion block.
*/
open func select(at index: Int, completion: ((ChipItem) -> Void)? = nil) {
guard -1 < index, index < chipItems.count else {
return
}
animate(to: chipItems[index], isTriggeredByUserInteraction: false, completion: completion)
}
/**
Animates to a given chipItem.
- Parameter to chipItem: A ChipItem.
- Parameter completion: An optional completion block.
*/
open func animate(to chipItem: ChipItem, completion: ((ChipItem) -> Void)? = nil) {
animate(to: chipItem, isTriggeredByUserInteraction: false, completion: completion)
}
}
fileprivate extension ChipBar {
/**
Animates to a given chipItem.
- Parameter to chipItem: A ChipItem.
- Parameter isTriggeredByUserInteraction: A boolean indicating whether the
state was changed by a user interaction, true if yes, false otherwise.
- Parameter completion: An optional completion block.
*/
func animate(to chipItem: ChipItem, isTriggeredByUserInteraction: Bool, completion: ((ChipItem) -> Void)? = nil) {
if isTriggeredByUserInteraction {
delegate?.chipBar?(chipBar: self, willSelect: chipItem)
}
selectedChipItem = chipItem
updateScrollView()
}
}
fileprivate extension ChipBar {
/// Updates the scrollView.
func updateScrollView() {
guard let v = selectedChipItem else {
return
}
if !scrollView.bounds.contains(v.frame) {
let contentOffsetX = (v.x < scrollView.bounds.minX) ? v.x : v.frame.maxX - scrollView.bounds.width
let normalizedOffsetX = min(max(contentOffsetX, 0), scrollView.contentSize.width - scrollView.bounds.width)
scrollView.setContentOffset(CGPoint(x: normalizedOffsetX, y: 0), animated: true)
}
}
}
/*
* Copyright (C) 2015 - 2017, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.com>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of CosmicMind nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import UIKit
fileprivate var ChipItemKey: UInt8 = 0
@objc(ChipBarAlignment)
public enum ChipBarAlignment: Int {
case top
case bottom
case hidden
}
extension UIViewController {
/**
A convenience property that provides access to the ChipBarController.
This is the recommended method of accessing the ChipBarController
through child UIViewControllers.
*/
public var chipsController: ChipBarController? {
return traverseViewControllerHierarchyForClassType()
}
}
open class ChipBarController: TransitionController {
/**
A Display value to indicate whether or not to
display the rootViewController to the full view
bounds, or up to the toolbar height.
*/
open var displayStyle = DisplayStyle.partial {
didSet {
layoutSubviews()
}
}
/// The ChipBar used to switch between view controllers.
@IBInspectable
open let chipBar = ChipBar()
/// The chipBar alignment.
open var chipBarAlignment = ChipBarAlignment.bottom {
didSet {
layoutSubviews()
}
}
open override func layoutSubviews() {
super.layoutSubviews()
layoutChipBar()
layoutContainer()
layoutRootViewController()
}
open override func prepare() {
super.prepare()
prepareChipBar()
}
}
fileprivate extension ChipBarController {
/// Prepares the ChipBar.
func prepareChipBar() {
chipBar.depthPreset = .depth1
view.addSubview(chipBar)
}
}
fileprivate extension ChipBarController {
/// Layout the container.
func layoutContainer() {
chipBar.width = view.width
switch displayStyle {
case .partial:
let p = chipBar.height
let y = view.height - p
switch chipBarAlignment {
case .top:
container.y = p
container.height = y
case .bottom:
container.y = 0
container.height = y
case .hidden:
container.y = 0
container.height = view.height
}
container.width = view.width
case .full:
container.frame = view.bounds
}
}
/// Layout the chipBar.
func layoutChipBar() {
chipBar.width = view.width
switch chipBarAlignment {
case .top:
chipBar.isHidden = false
chipBar.y = 0
case .bottom:
chipBar.isHidden = false
chipBar.y = view.height - chipBar.height
case .hidden:
chipBar.isHidden = true
}
}
/// Layout the rootViewController.
func layoutRootViewController() {
rootViewController.view.frame = container.bounds
}
}
......@@ -31,13 +31,6 @@
import UIKit
open class FABButton: Button {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepare() {
super.prepare()
depthPreset = .depth1
......
......@@ -43,18 +43,11 @@ extension UIViewController {
through child UIViewControllers.
*/
public var fabMenuController: FABMenuController? {
var viewController: UIViewController? = self
while nil != viewController {
if viewController is FABMenuController {
return viewController as? FABMenuController
}
viewController = viewController?.parent
}
return nil
return traverseViewControllerHierarchyForClassType()
}
}
open class FABMenuController: RootController {
open class FABMenuController: TransitionController {
/// Reference to the MenuView.
@IBInspectable
open let fabMenu = FABMenu()
......@@ -86,29 +79,42 @@ extension FABMenuController {
fileprivate func prepareFABMenu() {
fabMenu.delegate = self
fabMenu.zPosition = 1000
fabMenu.handleFABButtonCallback = handleFABButtonCallback
fabMenu.handleOpenCallback = handleOpenCallback
fabMenu.handleCloseCallback = handleCloseCallback
fabMenu.handleCompletionCallback = handleCompletionCallback
fabMenu.handleFABButtonCallback = { [weak self] in
self?.handleFABButtonCallback(button: $0)
}
fabMenu.handleOpenCallback = { [weak self] in
self?.handleOpenCallback()
}
fabMenu.handleCloseCallback = { [weak self] in
self?.handleCloseCallback()
}
fabMenu.handleCompletionCallback = { [weak self] in
self?.handleCompletionCallback(view: $0)
}
view.addSubview(fabMenu)
}
}
extension FABMenuController {
fileprivate extension FABMenuController {
/// Shows the fabMenuBacking.
fileprivate func showFabMenuBacking() {
func showFabMenuBacking() {
showFade()
showBlurView()
}
/// Hides the fabMenuBacking.
fileprivate func hideFabMenuBacking() {
func hideFabMenuBacking() {
hideFade()
hideBlurView()
}
/// Shows the blurView.
fileprivate func showBlurView() {
func showBlurView() {
guard .blur == fabMenuBacking else {
return
}
......@@ -129,7 +135,7 @@ extension FABMenuController {
}
/// Hides the blurView.
fileprivate func hideBlurView() {
func hideBlurView() {
guard .blur == fabMenuBacking else {
return
}
......@@ -143,7 +149,7 @@ extension FABMenuController {
}
/// Shows the fade.
fileprivate func showFade() {
func showFade() {
guard .fade == fabMenuBacking else {
return
}
......@@ -158,7 +164,7 @@ extension FABMenuController {
}
/// Hides the fade.
fileprivate func hideFade() {
func hideFade() {
guard .fade == fabMenuBacking else {
return
}
......@@ -173,13 +179,12 @@ extension FABMenuController {
}
}
extension FABMenuController {
fileprivate extension FABMenuController {
/**
Handler to toggle the FABMenu opened or closed.
- Parameter button: A UIButton.
*/
@objc
fileprivate func handleFABButtonCallback(button: UIButton) {
func handleFABButtonCallback(button: UIButton) {
guard fabMenu.isOpened else {
fabMenu.open(isTriggeredByUserInteraction: true)
return
......@@ -189,15 +194,13 @@ extension FABMenuController {
}
/// Handler for when the FABMenu.open function is called.
@objc
fileprivate func handleOpenCallback() {
func handleOpenCallback() {
isUserInteractionEnabled = false
showFabMenuBacking()
}
/// Handler for when the FABMenu.close function is called.
@objc
fileprivate func handleCloseCallback() {
func handleCloseCallback() {
isUserInteractionEnabled = false
hideFabMenuBacking()
}
......@@ -206,7 +209,7 @@ extension FABMenuController {
Completion handler for FABMenu open and close calls.
- Parameter view: A UIView.
*/
fileprivate func handleCompletionCallback(view: UIView) {
func handleCompletionCallback(view: UIView) {
if view == fabMenu.fabMenuItems.last {
isUserInteractionEnabled = true
}
......
......@@ -31,13 +31,6 @@
import UIKit
open class FlatButton: Button {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepare() {
super.prepare()
cornerRadiusPreset = .cornerRadius1
......
......@@ -31,14 +31,7 @@
import UIKit
open class IconButton: Button {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepare() {
open override func prepare() {
super.prepare()
pulseAnimation = .center
}
......
......@@ -30,12 +30,6 @@
import UIKit
@objc(ToolbarAlignment)
public enum ToolbarAlignment: Int {
case top
case bottom
}
open class ImageCard: Card {
/**
A Display value to indicate whether or not to
......
......@@ -38,19 +38,12 @@ public enum NavigationDrawerPosition: Int {
extension UIViewController {
/**
A convenience property that provides access to the NavigationDrawerController.
This is the recommended method of accessing the NavigationDrawerController
through child UIViewControllers.
*/
A convenience property that provides access to the NavigationDrawerController.
This is the recommended method of accessing the NavigationDrawerController
through child UIViewControllers.
*/
public var navigationDrawerController: NavigationDrawerController? {
var viewController: UIViewController? = self
while nil != viewController {
if viewController is NavigationDrawerController {
return viewController as? NavigationDrawerController
}
viewController = viewController?.parent
}
return nil
return traverseViewControllerHierarchyForClassType()
}
}
......@@ -143,7 +136,7 @@ public protocol NavigationDrawerControllerDelegate {
}
@objc(NavigationDrawerController)
open class NavigationDrawerController: RootController {
open class NavigationDrawerController: TransitionController {
/**
A CGFloat property that is used internally to track
the original (x) position of the container view when panning.
......@@ -415,8 +408,8 @@ open class NavigationDrawerController: RootController {
prepare()
}
open override func transition(to viewController: UIViewController, duration: TimeInterval = 0.5, options: UIViewAnimationOptions = [], animations: (() -> Void)? = nil, completion: ((Bool) -> Void)? = nil) {
super.transition(to: viewController, duration: duration, options: options, animations: animations) { [weak self, completion = completion] (result) in
open override func transition(to viewController: UIViewController, completion: ((Bool) -> Void)? = nil) {
super.transition(to: viewController) { [weak self, completion = completion] (result) in
guard let s = self else {
return
}
......@@ -452,6 +445,8 @@ open class NavigationDrawerController: RootController {
vc.view.center = CGPoint(x: rightViewWidth / 2, y: v.bounds.height / 2)
}
}
rootViewController.view.frame = container.bounds
}
open override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
......@@ -976,7 +971,7 @@ extension NavigationDrawerController {
/// Prepares the contentViewController.
fileprivate func prepareContentViewController() {
contentViewController.view.backgroundColor = .black
prepare(viewController: contentViewController, withContainer: view)
prepare(viewController: contentViewController, in: view)
view.sendSubview(toBack: contentViewController.view)
}
......@@ -986,7 +981,7 @@ extension NavigationDrawerController {
return
}
prepare(viewController: leftViewController, withContainer: v)
prepare(viewController: leftViewController, in: v)
}
/// A method that prepares the rightViewController.
......@@ -995,7 +990,7 @@ extension NavigationDrawerController {
return
}
prepare(viewController: rightViewController, withContainer: v)
prepare(viewController: rightViewController, in: v)
}
/// A method that prepares the leftView.
......@@ -1046,6 +1041,7 @@ extension NavigationDrawerController {
leftPanGesture = UIPanGestureRecognizer(target: self, action: #selector(handleLeftViewPanGesture(recognizer:)))
leftPanGesture!.delegate = self
leftPanGesture!.cancelsTouchesInView = false
view.addGestureRecognizer(leftPanGesture!)
}
......@@ -1069,6 +1065,7 @@ extension NavigationDrawerController {
rightPanGesture = UIPanGestureRecognizer(target: self, action: #selector(handleRightViewPanGesture(recognizer:)))
rightPanGesture!.delegate = self
rightPanGesture!.cancelsTouchesInView = false
view.addGestureRecognizer(rightPanGesture!)
}
......
......@@ -84,8 +84,16 @@ public class NavigationItem: NSObject {
}
}
/// An optional reference to the NavigationBar.
public var navigationBar: NavigationBar? {
return contentView.superview?.superview as? NavigationBar
var v = contentView.superview
while nil != v {
if let navigationBar = v as? NavigationBar {
return navigationBar
}
v = v?.superview
}
return nil
}
open override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
......
......@@ -31,13 +31,6 @@
import UIKit
open class RaisedButton: Button {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepare() {
super.prepare()
depthPreset = .depth1
......
......@@ -148,18 +148,11 @@ open class SearchBar: Bar {
return
}
textField.frame = contentView.bounds
layoutTextField()
layoutLeftView()
layoutClearButton()
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepare() {
super.prepare()
prepareTextField()
......@@ -168,10 +161,9 @@ open class SearchBar: Bar {
}
extension SearchBar {
/// Layout the clearButton.
open func layoutClearButton() {
let h = textField.frame.height
clearButton.frame = CGRect(x: textField.frame.width - h - 4, y: 4, width: h, height: h - 8)
/// Layout the textField.
open func layoutTextField() {
textField.frame = contentView.bounds
}
/// Layout the leftView.
......@@ -185,12 +177,18 @@ extension SearchBar {
(v as? UIImageView)?.contentMode = .scaleAspectFit
}
/// Layout the clearButton.
open func layoutClearButton() {
let h = textField.frame.height
clearButton.frame = CGRect(x: textField.frame.width - h - 4, y: 4, width: h, height: h - 8)
}
}
extension SearchBar {
fileprivate extension SearchBar {
/// Clears the textField text.
@objc
fileprivate func handleClearButton() {
func handleClearButton() {
guard nil == textField.delegate?.textFieldShouldClear || true == textField.delegate?.textFieldShouldClear?(textField) else {
return
}
......@@ -206,14 +204,14 @@ extension SearchBar {
// Live updates the search results.
@objc
fileprivate func handleEditingChanged(textField: UITextField) {
func handleEditingChanged(textField: UITextField) {
delegate?.searchBar?(searchBar: self, didChange: textField, with: textField.text)
}
}
extension SearchBar {
fileprivate extension SearchBar {
/// Prepares the textField.
fileprivate func prepareTextField() {
func prepareTextField() {
textField.contentScaleFactor = Screen.scale
textField.font = RobotoFont.regular(with: 17)
textField.backgroundColor = Color.clear
......@@ -226,7 +224,7 @@ extension SearchBar {
}
/// Prepares the clearButton.
fileprivate func prepareClearButton() {
func prepareClearButton() {
clearButton = IconButton(image: Icon.cm.close, tintColor: placeholderColor)
clearButton.contentEdgeInsets = .zero
isClearButtonAutoHandleEnabled = true
......
......@@ -30,22 +30,21 @@
import UIKit
extension UIViewController {
/**
@objc(SearchBarAlignment)
public enum SearchBarAlignment: Int {
case top
case bottom
}
public extension UIViewController {
/**
A convenience property that provides access to the SearchBarController.
This is the recommended method of accessing the SearchBarController
through child UIViewControllers.
*/
public var searchBarController: SearchBarController? {
var viewController: UIViewController? = self
while nil != viewController {
if viewController is SearchBarController {
return viewController as? SearchBarController
}
viewController = viewController?.parent
}
return nil
}
var searchBarController: SearchBarController? {
return traverseViewControllerHierarchyForClassType()
}
}
open class SearchBarController: StatusBarController {
......@@ -53,49 +52,71 @@ open class SearchBarController: StatusBarController {
@IBInspectable
open let searchBar = SearchBar()
/// The searchBar alignment.
open var searchBarAlignment = SearchBarAlignment.top {
didSet {
layoutSubviews()
}
}
open override func layoutSubviews() {
super.layoutSubviews()
let y = Application.shouldStatusBarBeHidden || statusBar.isHidden ? 0 : statusBar.height
searchBar.y = y
searchBar.width = view.width
switch displayStyle {
case .partial:
let h = y + searchBar.height
rootViewController.view.y = h
rootViewController.view.height = view.height - h
case .full:
rootViewController.view.frame = view.bounds
}
layoutSearchBar()
layoutContainer()
layoutRootViewController()
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepare() {
super.prepare()
displayStyle = .partial
prepareStatusBar()
prepareSearchBar()
prepareSearchBar()
}
}
extension SearchBarController {
/// Prepares the statusBar.
fileprivate func prepareStatusBar() {
shouldHideStatusBarOnRotation = false
}
fileprivate extension SearchBarController {
/// Prepares the searchBar.
fileprivate func prepareSearchBar() {
searchBar.depthPreset = .depth1
func prepareSearchBar() {
searchBar.zPosition = 1000
searchBar.depthPreset = .depth1
view.addSubview(searchBar)
}
}
fileprivate extension SearchBarController {
/// Layout the container.
func layoutContainer() {
switch displayStyle {
case .partial:
let p = searchBar.height
let q = statusBarOffsetAdjustment
let h = view.height - p - q
switch searchBarAlignment {
case .top:
container.y = q + p
container.height = h
case .bottom:
container.y = q
container.height = h
}
container.width = view.width
case .full:
container.frame = view.bounds
}
}
/// Layout the searchBar.
func layoutSearchBar() {
searchBar.x = 0
searchBar.y = .top == searchBarAlignment ? statusBarOffsetAdjustment : view.height - searchBar.height
searchBar.width = view.width
}
/// Layout the rootViewController.
func layoutRootViewController() {
rootViewController.view.frame = container.bounds
}
}
......@@ -78,18 +78,11 @@ extension UIViewController {
through child UIViewControllers.
*/
public var snackbarController: SnackbarController? {
var viewController: UIViewController? = self
while nil != viewController {
if viewController is SnackbarController {
return viewController as? SnackbarController
}
viewController = viewController?.parent
}
return nil
return traverseViewControllerHierarchyForClassType()
}
}
open class SnackbarController: RootController {
open class SnackbarController: TransitionController {
/// Reference to the Snackbar.
open let snackbar = Snackbar()
......
......@@ -37,18 +37,11 @@ extension UIViewController {
through child UIViewControllers.
*/
public var statusBarController: StatusBarController? {
var viewController: UIViewController? = self
while nil != viewController {
if viewController is StatusBarController {
return viewController as? StatusBarController
}
viewController = viewController?.parent
}
return nil
return traverseViewControllerHierarchyForClassType()
}
}
open class StatusBarController: RootController {
open class StatusBarController: TransitionController {
/**
A Display value to indicate whether or not to
display the rootViewController to the full view
......@@ -81,19 +74,20 @@ open class StatusBarController: RootController {
}
}
/// An adjustment based on the rules for displaying the statusBar.
open var statusBarOffsetAdjustment: CGFloat {
return Application.shouldStatusBarBeHidden || statusBar.isHidden ? 0 : statusBar.height
}
/// A boolean that indicates to hide the statusBar on rotation.
open var shouldHideStatusBarOnRotation = true
open var shouldHideStatusBarOnRotation = false
/// A reference to the statusBar.
open let statusBar = UIView()
/**
To execute in the order of the layout chain, override this
method. LayoutSubviews should be called immediately, unless you
have a certain need.
*/
open override func layoutSubviews() {
super.layoutSubviews()
if shouldHideStatusBarOnRotation {
statusBar.isHidden = Application.shouldStatusBarBeHidden
}
......@@ -103,20 +97,17 @@ open class StatusBarController: RootController {
switch displayStyle {
case .partial:
let h = statusBar.height
rootViewController.view.y = h
rootViewController.view.height = view.height - h
container.y = h
container.height = view.height - h
case .full:
rootViewController.view.frame = view.bounds
container.frame = view.bounds
}
}
rootViewController.view.frame = container.bounds
container.zPosition = statusBar.zPosition + (Application.shouldStatusBarBeHidden ? 1 : -1)
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepare() {
super.prepare()
prepareStatusBar()
......
......@@ -30,6 +30,13 @@
import UIKit
open class TabItem: FlatButton {
open override func prepare() {
super.prepare()
pulseAnimation = .none
}
}
@objc(TabBarLineAlignment)
public enum TabBarLineAlignment: Int {
case top
......@@ -39,22 +46,22 @@ public enum TabBarLineAlignment: Int {
@objc(TabBarDelegate)
public protocol TabBarDelegate {
/**
A delegation method that is executed when the button will trigger the
A delegation method that is executed when the tabItem will trigger the
animation to the next tab.
- Parameter tabBar: A TabBar.
- Parameter button: A UIButton.
- Parameter tabItem: A TabItem.
*/
@objc
optional func tabBar(tabBar: TabBar, willSelect button: UIButton)
optional func tabBar(tabBar: TabBar, willSelect tabItem: TabItem)
/**
A delegation method that is executed when the button did complete the
A delegation method that is executed when the tabItem did complete the
animation to the next tab.
- Parameter tabBar: A TabBar.
- Parameter button: A UIButton.
- Parameter tabItem: A TabItem.
*/
@objc
optional func tabBar(tabBar: TabBar, didSelect button: UIButton)
optional func tabBar(tabBar: TabBar, didSelect tabItem: TabItem)
}
@objc(TabBarStyle)
......@@ -65,30 +72,26 @@ public enum TabBarStyle: Int {
}
open class TabBar: Bar {
/// A boolean indicating if the TabBar line is in an animation state.
open fileprivate(set) var isAnimating = false
/// Only for inital load to get the line animation correct.
fileprivate var shouldNotAnimateLineView = false
/// The total width of the buttons.
fileprivate var buttonsTotalWidth: CGFloat {
/// The total width of the tabItems.
fileprivate var tabItemsTotalWidth: CGFloat {
var w: CGFloat = 0
for v in buttons {
w += v.sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, height: contentView.height)).width + interimSpace
let q = 2 * tabItemsInterimSpace
let p = q + tabItemsInterimSpace
for v in tabItems {
let x = v.sizeThatFits(CGSize(width: .greatestFiniteMagnitude, height: scrollView.height)).width
w += x
w += p
}
w -= tabItemsInterimSpace
return w
}
/// Enables and disables bouncing when swiping.
open var isBounceEnabled: Bool {
get {
return scrollView.bounces
}
set(value) {
scrollView.bounces = value
}
}
/// An enum that determines the tab bar style.
open var tabBarStyle = TabBarStyle.auto {
didSet {
......@@ -99,21 +102,24 @@ open class TabBar: Bar {
/// A reference to the scroll view when the tab bar style is scrollable.
open let scrollView = UIScrollView()
/// Does the scroll view bounce.
open var isScrollBounceEnabled = true {
didSet {
scrollView.bounces = true
/// Enables and disables bouncing when swiping.
open var isScrollBounceEnabled: Bool {
get {
return scrollView.bounces
}
set(value) {
scrollView.bounces = value
}
}
/// A delegation reference.
open weak var delegate: TabBarDelegate?
/// The currently selected button.
open fileprivate(set) var selected: UIButton?
/// The currently selected tabItem.
open fileprivate(set) var selectedTabItem: TabItem?
/// A preset wrapper around contentEdgeInsets.
open override var contentEdgeInsetsPreset: EdgeInsetsPreset {
/// A preset wrapper around tabItems contentEdgeInsets.
open var tabItemsContentEdgeInsetsPreset: EdgeInsetsPreset {
get {
return contentView.grid.contentEdgeInsetsPreset
}
......@@ -124,7 +130,7 @@ open class TabBar: Bar {
/// A reference to EdgeInsets.
@IBInspectable
open override var contentEdgeInsets: EdgeInsets {
open var tabItemsContentEdgeInsets: EdgeInsets {
get {
return contentView.grid.contentEdgeInsets
}
......@@ -133,8 +139,8 @@ open class TabBar: Bar {
}
}
/// A preset wrapper around interimSpace.
open override var interimSpacePreset: InterimSpacePreset {
/// A preset wrapper around tabItems interimSpace.
open var tabItemsInterimSpacePreset: InterimSpacePreset {
get {
return contentView.grid.interimSpacePreset
}
......@@ -143,9 +149,9 @@ open class TabBar: Bar {
}
}
/// A wrapper around contentView.grid.interimSpace.
/// A wrapper around tabItems interimSpace.
@IBInspectable
open override var interimSpace: InterimSpace {
open var tabItemsInterimSpace: InterimSpace {
get {
return contentView.grid.interimSpace
}
......@@ -154,32 +160,18 @@ open class TabBar: Bar {
}
}
/// Buttons.
open var buttons = [UIButton]() {
/// TabItems.
open var tabItems = [TabItem]() {
didSet {
for b in oldValue {
b.removeFromSuperview()
}
prepareButtons()
prepareTabItems()
layoutSubviews()
}
}
/// A boolean to animate the line when touched.
@IBInspectable
open var isLineAnimated = true {
didSet {
for b in buttons {
if isLineAnimated {
prepareLineAnimationHandler(button: b)
} else {
removeLineAnimationHandler(button: b)
}
}
}
}
/// A reference to the line UIView.
open let line = UIView()
......@@ -216,106 +208,17 @@ open class TabBar: Bar {
return
}
var lc = 0
var rc = 0
grid.begin()
grid.views.removeAll()
for v in leftViews {
if let b = v as? UIButton {
b.contentEdgeInsets = .zero
b.titleEdgeInsets = .zero
}
v.width = v.intrinsicContentSize.width
v.sizeToFit()
v.grid.columns = Int(ceil(v.width / gridFactor)) + 2
lc += v.grid.columns
grid.views.append(v)
}
grid.views.append(contentView)
for v in rightViews {
if let b = v as? UIButton {
b.contentEdgeInsets = .zero
b.titleEdgeInsets = .zero
}
v.width = v.intrinsicContentSize.width
v.sizeToFit()
v.grid.columns = Int(ceil(v.width / gridFactor)) + 2
rc += v.grid.columns
grid.views.append(v)
}
contentView.grid.begin()
contentView.grid.offset.columns = 0
var l: CGFloat = 0
var r: CGFloat = 0
if .center == contentViewAlignment {
if leftViews.count < rightViews.count {
r = CGFloat(rightViews.count) * interimSpace
l = r
} else {
l = CGFloat(leftViews.count) * interimSpace
r = l
}
}
let p = width - l - r - contentEdgeInsets.left - contentEdgeInsets.right
let columns = Int(ceil(p / gridFactor))
if .center == contentViewAlignment {
if lc < rc {
contentView.grid.columns = columns - 2 * rc
contentView.grid.offset.columns = rc - lc
} else {
contentView.grid.columns = columns - 2 * lc
rightViews.first?.grid.offset.columns = lc - rc
}
} else {
contentView.grid.columns = columns - lc - rc
}
grid.axis.columns = columns
if .scrollable == tabBarStyle || (.auto == tabBarStyle && buttonsTotalWidth > bounds.width) {
var w: CGFloat = 0
for v in buttons {
let x = v.sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, height: contentView.height)).width + interimSpace
scrollView.addSubview(v)
v.height = scrollView.height
v.width = x
v.x = w
w += x
}
scrollView.contentSize = CGSize(width: w, height: height)
} else {
scrollView.grid.views = buttons
scrollView.grid.axis.columns = buttons.count
scrollView.contentSize = CGSize(width: scrollView.width, height: height)
}
grid.commit()
contentView.grid.commit()
layoutDivider()
layoutScrollView()
layoutLine()
updateScrollView()
}
open override func prepare() {
super.prepare()
contentEdgeInsetsPreset = .none
interimSpacePreset = .interimSpace6
tabItemsInterimSpacePreset = .interimSpace4
prepareContentView()
prepareScrollView()
......@@ -330,6 +233,7 @@ fileprivate extension TabBar {
line.zPosition = 10000
lineColor = Color.blue.base
lineHeight = 3
scrollView.addSubview(line)
}
/// Prepares the divider.
......@@ -338,26 +242,27 @@ fileprivate extension TabBar {
dividerAlignment = .top
}
/// Prepares the buttons.
func prepareButtons() {
for v in buttons {
/// Prepares the tabItems.
func prepareTabItems() {
shouldNotAnimateLineView = true
for v in tabItems {
v.grid.columns = 0
v.cornerRadius = 0
v.contentEdgeInsets = .zero
if isLineAnimated {
prepareLineAnimationHandler(button: v)
}
prepareLineAnimationHandler(tabItem: v)
}
selectedTabItem = tabItems.first
}
/**
Prepares the line animation handlers.
- Parameter button: A UIButton.
- Parameter tabItem: A TabItem.
*/
func prepareLineAnimationHandler(button: UIButton) {
removeLineAnimationHandler(button: button)
button.addTarget(self, action: #selector(handleLineAnimation(button:)), for: .touchUpInside)
func prepareLineAnimationHandler(tabItem: TabItem) {
removeLineAnimationHandler(tabItem: tabItem)
tabItem.addTarget(self, action: #selector(handleLineAnimation(tabItem:)), for: .touchUpInside)
}
/// Prepares the contentView.
......@@ -367,105 +272,155 @@ fileprivate extension TabBar {
/// Prepares the scroll view.
func prepareScrollView() {
scrollView.isPagingEnabled = false
scrollView.showsVerticalScrollIndicator = false
scrollView.showsHorizontalScrollIndicator = false
scrollView.addSubview(line)
centerViews = [scrollView]
}
}
fileprivate extension TabBar {
/// Layout the scrollView.
func layoutScrollView() {
contentView.grid.reload()
if .scrollable == tabBarStyle || (.auto == tabBarStyle && tabItemsTotalWidth > scrollView.width) {
var w: CGFloat = 0
let q = 2 * tabItemsInterimSpace
let p = q + tabItemsInterimSpace
for v in tabItems {
let x = v.sizeThatFits(CGSize(width: .greatestFiniteMagnitude, height: scrollView.height)).width
v.height = scrollView.height
v.width = x + q
v.x = w
w += x
w += p
if scrollView != v.superview {
v.removeFromSuperview()
scrollView.addSubview(v)
}
}
w -= tabItemsInterimSpace
scrollView.contentSize = CGSize(width: w, height: scrollView.height)
} else {
scrollView.grid.begin()
scrollView.grid.views = tabItems
scrollView.grid.axis.columns = tabItems.count
scrollView.grid.contentEdgeInsets = tabItemsContentEdgeInsets
scrollView.grid.interimSpace = tabItemsInterimSpace
scrollView.grid.commit()
scrollView.contentSize = scrollView.frame.size
}
}
/// Layout the line view.
func layoutLine() {
guard 0 < buttons.count else {
guard let v = selectedTabItem else {
return
}
if nil == selected {
selected = buttons.first
guard shouldNotAnimateLineView else {
line.animate(.duration(0),
.size(CGSize(width: v.width, height: lineHeight)),
.position(CGPoint(x: v.center.x, y: .bottom == lineAlignment ? height - lineHeight / 2 : lineHeight / 2)))
return
}
line.animate(.duration(0),
.size(CGSize(width: selected!.width, height: lineHeight)),
.position(CGPoint(x: selected!.center.x, y: .bottom == lineAlignment ? height - lineHeight / 2 : lineHeight / 2)))
line.frame = CGRect(x: v.x, y: .bottom == lineAlignment ? scrollView.height - lineHeight : 0, width: v.width, height: lineHeight)
shouldNotAnimateLineView = false
}
}
extension TabBar {
fileprivate extension TabBar {
/**
Removes the line animation handlers.
- Parameter button: A UIButton.
- Parameter tabItem: A TabItem.
*/
fileprivate func removeLineAnimationHandler(button: UIButton) {
button.removeTarget(self, action: #selector(handleLineAnimation(button:)), for: .touchUpInside)
func removeLineAnimationHandler(tabItem: TabItem) {
tabItem.removeTarget(self, action: #selector(handleLineAnimation(tabItem:)), for: .touchUpInside)
}
}
extension TabBar {
/// Handles the button touch event.
fileprivate extension TabBar {
/// Handles the tabItem touch event.
@objc
fileprivate func handleLineAnimation(button: UIButton) {
animate(to: button, isTriggeredByUserInteraction: true)
func handleLineAnimation(tabItem: TabItem) {
animate(to: tabItem, isTriggeredByUserInteraction: true)
}
}
extension TabBar {
/**
Selects a given index from the buttons array.
Selects a given index from the tabItems array.
- Parameter at index: An Int.
- Paramater completion: An optional completion block.
*/
open func select(at index: Int, completion: ((UIButton) -> Void)? = nil) {
guard -1 < index, index < buttons.count else {
open func select(at index: Int, completion: ((TabItem) -> Void)? = nil) {
guard -1 < index, index < tabItems.count else {
return
}
animate(to: buttons[index], isTriggeredByUserInteraction: false, completion: completion)
animate(to: tabItems[index], isTriggeredByUserInteraction: false, completion: completion)
}
/**
Animates to a given button.
- Parameter to button: A UIButton.
Animates to a given tabItem.
- Parameter to tabItem: A TabItem.
- Parameter completion: An optional completion block.
*/
open func animate(to button: UIButton, completion: ((UIButton) -> Void)? = nil) {
animate(to: button, isTriggeredByUserInteraction: false, completion: completion)
open func animate(to tabItem: TabItem, completion: ((TabItem) -> Void)? = nil) {
animate(to: tabItem, isTriggeredByUserInteraction: false, completion: completion)
}
}
fileprivate extension TabBar {
/**
Animates to a given button.
- Parameter to button: A UIButton.
Animates to a given tabItem.
- Parameter to tabItem: A TabItem.
- Parameter isTriggeredByUserInteraction: A boolean indicating whether the
state was changed by a user interaction, true if yes, false otherwise.
- Parameter completion: An optional completion block.
*/
fileprivate func animate(to button: UIButton, isTriggeredByUserInteraction: Bool, completion: ((UIButton) -> Void)? = nil) {
func animate(to tabItem: TabItem, isTriggeredByUserInteraction: Bool, completion: ((TabItem) -> Void)? = nil) {
if isTriggeredByUserInteraction {
delegate?.tabBar?(tabBar: self, willSelect: button)
delegate?.tabBar?(tabBar: self, willSelect: tabItem)
}
selected = button
isAnimating = true
selectedTabItem = tabItem
line.animate(.duration(0.25),
.size(CGSize(width: button.width, height: lineHeight)),
.position(CGPoint(x: button.center.x, y: .bottom == lineAlignment ? height - lineHeight / 2 : lineHeight / 2)),
.completion { [weak self, isTriggeredByUserInteraction = isTriggeredByUserInteraction, button = button, completion = completion] _ in
.size(CGSize(width: tabItem.width, height: lineHeight)),
.position(CGPoint(x: tabItem.center.x, y: .bottom == lineAlignment ? height - lineHeight / 2 : lineHeight / 2)),
.completion { [weak self, isTriggeredByUserInteraction = isTriggeredByUserInteraction, tabItem = tabItem, completion = completion] _ in
guard let s = self else {
return
}
s.isAnimating = false
if isTriggeredByUserInteraction {
s.delegate?.tabBar?(tabBar: s, didSelect: button)
s.delegate?.tabBar?(tabBar: s, didSelect: tabItem)
}
completion?(button)
completion?(tabItem)
})
if !scrollView.bounds.contains(button.frame) {
let contentOffsetX = (button.x < scrollView.bounds.minX) ? button.x : button.frame.maxX - scrollView.bounds.width
updateScrollView()
}
}
fileprivate extension TabBar {
/// Updates the scrollView.
func updateScrollView() {
guard let v = selectedTabItem else {
return
}
if !scrollView.bounds.contains(v.frame) {
let contentOffsetX = (v.x < scrollView.bounds.minX) ? v.x : v.frame.maxX - scrollView.bounds.width
let normalizedOffsetX = min(max(contentOffsetX, 0), scrollView.contentSize.width - scrollView.bounds.width)
scrollView.setContentOffset(CGPoint(x: normalizedOffsetX, y: 0), animated: true)
}
......
......@@ -32,18 +32,10 @@ import UIKit
fileprivate var TabItemKey: UInt8 = 0
open class TabItem: FlatButton {
open override func prepare() {
super.prepare()
pulseAnimation = .none
}
}
@objc(TabBarAlignment)
public enum TabBarAlignment: Int {
case top
case bottom
case hidden
}
extension UIViewController {
......@@ -67,42 +59,40 @@ extension UIViewController {
through child UIViewControllers.
*/
public var tabsController: TabsController? {
var viewController: UIViewController? = self
while nil != viewController {
if viewController is TabsController {
return viewController as? TabsController
}
viewController = viewController?.parent
}
return nil
return traverseViewControllerHierarchyForClassType()
}
}
open class TabsController: UIViewController {
open class TabsController: TransitionController {
/**
A Display value to indicate whether or not to
display the rootViewController to the full view
bounds, or up to the toolbar height.
*/
open var displayStyle = DisplayStyle.partial {
didSet {
layoutSubviews()
}
}
/// The TabBar used to switch between view controllers.
@IBInspectable
open let tabBar = TabBar()
@IBInspectable
public let container = UIView()
/// An Array of UIViewControllers.
open var viewControllers: [UIViewController] {
didSet {
oldValue.forEach { [weak self] in
self?.removeViewController(viewController: $0)
}
selectedIndex = 0
prepareRootViewController()
prepareTabBar()
prepareContainer()
prepareViewControllers()
layoutSubviews()
}
}
/// A reference to the currently selected view controller index value.
@IBInspectable
open var selectedIndex = 0
open fileprivate(set) var selectedIndex = 0
/// The tabBar alignment.
open var tabBarAlignment = TabBarAlignment.bottom {
......@@ -111,9 +101,6 @@ open class TabsController: UIViewController {
}
}
/// The transition type used during a transition.
open var motionTransitionType = MotionTransitionType.fade
/**
An initializer that initializes the object with a NSCoder object.
- Parameter aDecoder: A NSCoder instance.
......@@ -133,6 +120,11 @@ open class TabsController: UIViewController {
super.init(nibName: nil, bundle: nil)
}
fileprivate override init(rootViewController: UIViewController) {
self.viewControllers = []
super.init(rootViewController: rootViewController)
}
open override func viewDidLoad() {
super.viewDidLoad()
prepare()
......@@ -143,61 +135,33 @@ open class TabsController: UIViewController {
layoutSubviews()
}
/**
To execute in the order of the layout chain, override this
method. `layoutSubviews` should be called immediately, unless you
have a certain need.
*/
open func layoutSubviews() {
open override func layoutSubviews() {
super.layoutSubviews()
layoutTabBar()
layoutContainer()
layoutViewController(at: selectedIndex)
layoutRootViewController()
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepare() {
open override func prepare() {
super.prepare()
view.backgroundColor = .white
view.contentScaleFactor = Screen.scale
prepareContainer()
prepareTabBar()
prepareTabBarButtons()
prepareViewControllers()
prepareTabBar()
prepareTabBarItems()
}
}
fileprivate extension TabsController {
/// Prepares the container view.
func prepareContainer() {
view.addSubview(container)
}
/// Prepares the TabBar.
func prepareTabBar() {
tabBar.lineAlignment = .bottom == tabBarAlignment ? .top : .bottom
view.addSubview(tabBar)
}
/// Prepares the tabBar buttons.
func prepareTabBarButtons() {
var buttons = [UIButton]()
for v in viewControllers {
let b = v.tabItem
b.removeTarget(self, action: #selector(handleTabBarButton(button:)), for: .touchUpInside)
b.addTarget(self, action: #selector(handleTabBarButton(button:)), for: .touchUpInside)
buttons.append(b)
}
tabBar.buttons = buttons
internal extension TabsController {
override func prepareRootViewController() {
rootViewController = viewControllers[selectedIndex]
}
/// Prepares all the view controllers.
}
fileprivate extension TabsController {
/// Prepares all the view controllers.
func prepareViewControllers() {
for i in 0..<viewControllers.count {
guard i != selectedIndex else {
......@@ -209,6 +173,7 @@ fileprivate extension TabsController {
}
prepareViewController(at: selectedIndex)
prepareRootViewController()
}
/**
......@@ -217,83 +182,75 @@ fileprivate extension TabsController {
- Parameter at index: An Int for the viewControllers index.
*/
func prepareViewController(at index: Int) {
let vc = viewControllers[index]
let v = viewControllers[index]
guard !childViewControllers.contains(vc) else {
guard !childViewControllers.contains(v) else {
return
}
addChildViewController(vc)
vc.didMove(toParentViewController: self)
vc.isMotionEnabled = true
vc.view.clipsToBounds = true
vc.view.contentScaleFactor = Screen.scale
container.addSubview(vc.view)
prepare(viewController: v, in: container)
}
/// Prepares the TabBar.
func prepareTabBar() {
tabBar.lineAlignment = .bottom == tabBarAlignment ? .top : .bottom
view.addSubview(tabBar)
}
/// Prepares the `tabBar.tabItems`.
func prepareTabBarItems() {
var tabItems = [TabItem]()
for v in viewControllers {
let b = v.tabItem
b.removeTarget(self, action: #selector(handle(tabItem:)), for: .touchUpInside)
b.addTarget(self, action: #selector(handle(tabItem:)), for: .touchUpInside)
tabItems.append(b)
}
tabBar.tabItems = tabItems
}
}
fileprivate extension TabsController {
/// Layout the container view.
/// Layout the container.
func layoutContainer() {
let p = tabBar.height
let y = view.height - p
switch tabBarAlignment {
case .top:
container.y = p
container.height = y
case .bottom:
container.y = 0
container.height = y
case .hidden:
container.y = 0
container.height = view.height
switch displayStyle {
case .partial:
let p = tabBar.height
let y = view.height - p
switch tabBarAlignment {
case .top:
container.y = p
container.height = y
case .bottom:
container.y = 0
container.height = y
}
container.width = view.width
case .full:
container.frame = view.bounds
}
container.width = view.width
}
/// Layout the TabBar.
/// Layout the tabBar.
func layoutTabBar() {
let y = view.height - tabBar.height
tabBar.x = 0
tabBar.y = .top == tabBarAlignment ? 0 : view.height - tabBar.height
tabBar.width = view.width
switch tabBarAlignment {
case .top:
tabBar.isHidden = false
tabBar.y = 0
case .bottom:
tabBar.isHidden = false
tabBar.y = y
case .hidden:
tabBar.isHidden = true
}
}
/// Layout the view controller at the given index.
func layoutViewController(at index: Int) {
viewControllers[index].view.frame.size = container.bounds.size
/// Layout the rootViewController.
func layoutRootViewController() {
rootViewController.view.frame = container.bounds
}
}
fileprivate extension TabsController {
/**
Removes the view controller as a child view controller with
the given index.
- Parameter at index: An Int for the view controller position.
*/
func removeViewController(at index: Int) {
let v = viewControllers[index]
guard childViewControllers.contains(v) else {
return
}
removeViewController(viewController: v)
}
/**
Removes a given view controller from the childViewControllers array.
- Parameter at index: An Int for the view controller position.
*/
......@@ -307,11 +264,11 @@ fileprivate extension TabsController {
fileprivate extension TabsController {
/**
Handles the tabItem.
- Parameter button: A UIButton.
- Parameter tabItem: A TabItem.
*/
@objc
func handleTabBarButton(button: UIButton) {
guard let i = tabBar.buttons.index(of: button) else {
func handle(tabItem: TabItem) {
guard let i = tabBar.tabItems.index(of: tabItem) else {
return
}
......@@ -319,26 +276,12 @@ fileprivate extension TabsController {
return
}
let fvc = viewControllers[selectedIndex]
let tvc = viewControllers[i]
tvc.view.isHidden = false
tvc.view.frame.size = container.bounds.size
tvc.motionModalTransitionType = motionTransitionType
view.isUserInteractionEnabled = false
Motion.shared.transition(from: fvc, to: tvc, in: container) { [weak self] (isFinished) in
guard let s = self else {
return
}
s.view.isUserInteractionEnabled = true
transition(to: viewControllers[i]) { [weak self] (isFinished) in
guard isFinished else {
return
}
s.selectedIndex = i
self?.selectedIndex = i
}
}
}
......@@ -40,27 +40,27 @@ public enum TextFieldPlaceholderAnimation: Int {
public protocol TextFieldDelegate: UITextFieldDelegate {
/**
A delegation method that is executed when the textField changed.
- Parameter textField: A UITextField.
- Parameter textField: A TextField.
- Parameter didChange text: An optional String.
*/
@objc
optional func textField(textField: UITextField, didChange text: String?)
optional func textField(textField: TextField, didChange text: String?)
/**
A delegation method that is executed when the textField will clear.
- Parameter textField: A UITextField.
- Parameter textField: A TextField.
- Parameter willClear text: An optional String.
*/
@objc
optional func textField(textField: UITextField, willClear text: String?)
optional func textField(textField: TextField, willClear text: String?)
/**
A delegation method that is executed when the textField is cleared.
- Parameter textField: A UITextField.
- Parameter textField: A TextField.
- Parameter didClear text: An optional String.
*/
@objc
optional func textField(textField: UITextField, didClear text: String?)
optional func textField(textField: TextField, didClear text: String?)
}
open class TextField: UITextField {
......@@ -283,7 +283,7 @@ open class TextField: UITextField {
clearButtonMode = .never
rightViewMode = .whileEditing
rightView = clearIconButton
isClearIconButtonAutoHandled = isClearIconButtonAutoHandled ? true : false
isClearIconButtonAutoHandled = { isClearIconButtonAutoHandled }()
layoutSubviews()
}
......@@ -330,7 +330,7 @@ open class TextField: UITextField {
clearButtonMode = .never
rightViewMode = .whileEditing
rightView = visibilityIconButton
isVisibilityIconButtonAutoHandled = isVisibilityIconButtonAutoHandled ? true : false
isVisibilityIconButtonAutoHandled = { isVisibilityIconButtonAutoHandled }()
layoutSubviews()
}
......@@ -338,7 +338,7 @@ open class TextField: UITextField {
/// Enables the automatic handling of the visibilityIconButton.
@IBInspectable
open var isVisibilityIconButtonAutoHandled: Bool = true {
open var isVisibilityIconButtonAutoHandled = true {
didSet {
visibilityIconButton?.removeTarget(self, action: #selector(handleVisibilityIconButton), for: .touchUpInside)
......@@ -428,21 +428,21 @@ open class TextField: UITextField {
}
}
extension TextField {
fileprivate extension TextField {
/// Prepares the divider.
fileprivate func prepareDivider() {
func prepareDivider() {
dividerColor = dividerNormalColor
}
/// Prepares the placeholderLabel.
fileprivate func preparePlaceholderLabel() {
func preparePlaceholderLabel() {
placeholderNormalColor = Color.darkText.others
placeholderLabel.backgroundColor = .clear
addSubview(placeholderLabel)
}
/// Prepares the detailLabel.
fileprivate func prepareDetailLabel() {
func prepareDetailLabel() {
detailLabel.font = RobotoFont.regular(with: 12)
detailLabel.numberOfLines = 0
detailColor = Color.darkText.others
......@@ -450,46 +450,46 @@ extension TextField {
}
/// Prepares the leftView.
fileprivate func prepareLeftView() {
func prepareLeftView() {
leftView?.contentMode = .left
leftViewMode = .always
updateLeftViewColor()
}
/// Prepares the target handlers.
fileprivate func prepareTargetHandlers() {
func prepareTargetHandlers() {
addTarget(self, action: #selector(handleEditingDidBegin), for: .editingDidBegin)
addTarget(self, action: #selector(handleEditingChanged), for: .editingChanged)
addTarget(self, action: #selector(handleEditingDidEnd), for: .editingDidEnd)
}
/// Prepares the textAlignment.
fileprivate func prepareTextAlignment() {
func prepareTextAlignment() {
textAlignment = .rightToLeft == Application.userInterfaceLayoutDirection ? .right : .left
}
}
extension TextField {
fileprivate extension TextField {
/// Updates the leftView tint color.
fileprivate func updateLeftViewColor() {
func updateLeftViewColor() {
leftView?.tintColor = isEditing ? leftViewActiveColor : leftViewNormalColor
}
/// Updates the placeholderLabel text color.
fileprivate func updatePlaceholderLabelColor() {
func updatePlaceholderLabelColor() {
tintColor = placeholderActiveColor
placeholderLabel.textColor = isEditing ? placeholderActiveColor : placeholderNormalColor
}
/// Updates the detailLabel text color.
fileprivate func updateDetailLabelColor() {
func updateDetailLabelColor() {
detailLabel.textColor = detailColor
}
}
extension TextField {
fileprivate extension TextField {
/// Layout the placeholderLabel.
fileprivate func layoutPlaceholderLabel() {
func layoutPlaceholderLabel() {
let w = leftViewWidth + textInset
let h = 0 == height ? intrinsicContentSize.height : height
......@@ -515,7 +515,7 @@ extension TextField {
}
/// Layout the detailLabel.
fileprivate func layoutDetailLabel() {
func layoutDetailLabel() {
let c = dividerContentEdgeInsets
detailLabel.height = detailLabel.sizeThatFits(CGSize(width: width, height: .greatestFiniteMagnitude)).height
detailLabel.x = c.left
......@@ -524,12 +524,12 @@ extension TextField {
}
/// Layout the a button.
fileprivate func layoutButton(button: UIButton?) {
func layoutButton(button: UIButton?) {
button?.frame = CGRect(x: width - height, y: 0, width: height, height: height)
}
/// Layout the leftView.
fileprivate func layoutLeftView() {
func layoutLeftView() {
guard let v = leftView else {
return
}
......@@ -540,10 +540,10 @@ extension TextField {
}
}
extension TextField {
fileprivate extension TextField {
/// Handles the text editing did begin state.
@objc
fileprivate func handleEditingDidBegin() {
func handleEditingDidBegin() {
leftViewEditingBeginAnimation()
placeholderEditingDidBeginAnimation()
dividerEditingDidBeginAnimation()
......@@ -551,13 +551,13 @@ extension TextField {
// Live updates the textField text.
@objc
fileprivate func handleEditingChanged(textField: UITextField) {
func handleEditingChanged(textField: UITextField) {
(delegate as? TextFieldDelegate)?.textField?(textField: self, didChange: textField.text)
}
/// Handles the text editing did end state.
@objc
fileprivate func handleEditingDidEnd() {
func handleEditingDidEnd() {
leftViewEditingEndAnimation()
placeholderEditingDidEndAnimation()
dividerEditingDidEndAnimation()
......@@ -565,7 +565,7 @@ extension TextField {
/// Handles the clearIconButton TouchUpInside event.
@objc
fileprivate func handleClearIconButton() {
func handleClearIconButton() {
guard nil == delegate?.textFieldShouldClear || true == delegate?.textFieldShouldClear?(self) else {
return
}
......@@ -581,7 +581,7 @@ extension TextField {
/// Handles the visibilityIconButton TouchUpInside event.
@objc
fileprivate func handleVisibilityIconButton() {
func handleVisibilityIconButton() {
isSecureTextEntry = !isSecureTextEntry
if !isSecureTextEntry {
......
......@@ -135,13 +135,6 @@ open class Toolbar: Bar {
}
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepare() {
super.prepare()
contentViewAlignment = .center
......
......@@ -30,41 +30,21 @@
import UIKit
extension UIViewController {
/**
@objc(ToolbarAlignment)
public enum ToolbarAlignment: Int {
case top
case bottom
}
public extension UIViewController {
/**
A convenience property that provides access to the ToolbarController.
This is the recommended method of accessing the ToolbarController
through child UIViewControllers.
*/
public var toolbarController: ToolbarController? {
var viewController: UIViewController? = self
while nil != viewController {
if viewController is ToolbarController {
return viewController as? ToolbarController
}
viewController = viewController?.parent
}
return nil
}
}
@objc(ToolbarControllerDelegate)
public protocol ToolbarControllerDelegate {
/// Delegation method that executes when the floatingViewController will open.
@objc
optional func toolbarControllerWillOpenFloatingViewController(toolbarController: ToolbarController)
/// Delegation method that executes when the floatingViewController will close.
@objc
optional func toolbarControllerWillCloseFloatingViewController(toolbarController: ToolbarController)
/// Delegation method that executes when the floatingViewController did open.
@objc
optional func toolbarControllerDidOpenFloatingViewController(toolbarController: ToolbarController)
/// Delegation method that executes when the floatingViewController did close.
@objc
optional func toolbarControllerDidCloseFloatingViewController(toolbarController: ToolbarController)
var toolbarController: ToolbarController? {
return traverseViewControllerHierarchyForClassType()
}
}
@objc(ToolbarController)
......@@ -73,142 +53,71 @@ open class ToolbarController: StatusBarController {
@IBInspectable
open let toolbar = Toolbar()
/// Internal reference to the floatingViewController.
private var internalFloatingViewController: UIViewController?
/// Delegation handler.
open weak var delegate: ToolbarControllerDelegate?
/// A floating UIViewController.
open var floatingViewController: UIViewController? {
get {
return internalFloatingViewController
}
set(value) {
if let v = internalFloatingViewController {
v.view.layer.rasterizationScale = Screen.scale
v.view.layer.shouldRasterize = true
delegate?.toolbarControllerWillCloseFloatingViewController?(toolbarController: self)
internalFloatingViewController = nil
UIView.animate(withDuration: 0.5,
animations: { [weak self] in
guard let s = self else {
return
}
v.view.center.y = 2 * s.view.bounds.height
s.toolbar.alpha = 1
s.rootViewController.view.alpha = 1
}) { [weak self] _ in
guard let s = self else {
return
}
v.willMove(toParentViewController: nil)
v.view.removeFromSuperview()
v.removeFromParentViewController()
v.view.layer.shouldRasterize = false
s.isUserInteractionEnabled = true
s.toolbar.isUserInteractionEnabled = true
DispatchQueue.main.async { [weak self] in
guard let s = self else {
return
}
s.delegate?.toolbarControllerDidCloseFloatingViewController?(toolbarController: s)
}
}
}
if let v = value {
// Add the noteViewController! to the view.
addChildViewController(v)
v.view.frame = view.bounds
v.view.center.y = 2 * view.bounds.height
v.view.isHidden = true
view.insertSubview(v.view, aboveSubview: toolbar)
v.view.layer.zPosition = 1500
v.didMove(toParentViewController: self)
v.view.isHidden = false
v.view.layer.rasterizationScale = Screen.scale
v.view.layer.shouldRasterize = true
view.layer.rasterizationScale = Screen.scale
view.layer.shouldRasterize = true
internalFloatingViewController = v
isUserInteractionEnabled = false
toolbar.isUserInteractionEnabled = false
delegate?.toolbarControllerWillOpenFloatingViewController?(toolbarController: self)
UIView.animate(withDuration: 0.5,
animations: { [weak self, v = v] in
guard let s = self else {
return
}
v.view.center.y = s.view.bounds.height / 2
s.toolbar.alpha = 0.5
s.rootViewController.view.alpha = 0.5
}) { [weak self, v = v] _ in
guard let s = self else {
return
}
v.view.layer.shouldRasterize = false
s.view.layer.shouldRasterize = false
DispatchQueue.main.async { [weak self] in
guard let s = self else {
return
}
s.delegate?.toolbarControllerDidOpenFloatingViewController?(toolbarController: s)
}
}
}
}
}
open override func layoutSubviews() {
super.layoutSubviews()
let y = Application.shouldStatusBarBeHidden || statusBar.isHidden ? 0 : statusBar.height
toolbar.y = y
toolbar.width = view.width
switch displayStyle {
case .partial:
let h = y + toolbar.height
rootViewController.view.y = h
rootViewController.view.height = view.height - h
case .full:
rootViewController.view.frame = view.bounds
/// The toolbar alignment.
open var toolbarAlignment = ToolbarAlignment.top {
didSet {
layoutSubviews()
}
}
open override func layoutSubviews() {
super.layoutSubviews()
layoutToolbar()
layoutContainer()
layoutRootViewController()
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepare() {
super.prepare()
displayStyle = .partial
prepareStatusBar()
prepareToolbar()
}
}
extension ToolbarController {
/// Prepares the statusBar.
fileprivate func prepareStatusBar() {
shouldHideStatusBarOnRotation = false
}
fileprivate extension ToolbarController {
/// Prepares the toolbar.
fileprivate func prepareToolbar() {
func prepareToolbar() {
toolbar.zPosition = 1000
toolbar.depthPreset = .depth1
view.addSubview(toolbar)
}
}
fileprivate extension ToolbarController {
/// Layout the container.
func layoutContainer() {
switch displayStyle {
case .partial:
let p = toolbar.height
let q = statusBarOffsetAdjustment
let h = view.height - p - q
switch toolbarAlignment {
case .top:
container.y = q + p
container.height = h
case .bottom:
container.y = q
container.height = h
}
container.width = view.width
case .full:
container.frame = view.bounds
}
}
/// Layout the toolbar.
func layoutToolbar() {
toolbar.x = 0
toolbar.y = .top == toolbarAlignment ? statusBarOffsetAdjustment : view.height - toolbar.height
toolbar.width = view.width
}
/// Layout the rootViewController.
func layoutRootViewController() {
rootViewController.view.frame = container.bounds
}
}
......@@ -30,7 +30,40 @@
import UIKit
open class RootController: UIViewController {
internal extension UIViewController {
/**
Finds a view controller with a given type based on
the view controller subclass.
- Returns: An optional of type T.
*/
func traverseViewControllerHierarchyForClassType<T: UIViewController>() -> T? {
var v: UIViewController? = self
while nil != v {
if v is T {
return v as? T
}
v = v?.parent as? TransitionController
}
return Application.rootViewController?.traverseTransitionViewControllerHierarchyForClassType()
}
/**
Traverses the child view controllers to find the correct view controller type T.
- Returns: An optional of type T.
*/
func traverseTransitionViewControllerHierarchyForClassType<T: UIViewController>() -> T? {
if let v = self as? T {
return v
} else if let v = self as? TransitionController {
return v.rootViewController.traverseTransitionViewControllerHierarchyForClassType()
}
return nil
}
}
open class TransitionController: UIViewController {
/**
A Boolean property used to enable and disable interactivity
with the rootViewController.
......@@ -45,14 +78,21 @@ open class RootController: UIViewController {
}
}
/// A reference to the container view.
@IBInspectable
open let container = UIView()
/**
A UIViewController property that references the active
main UIViewController. To swap the rootViewController, it
is recommended to use the transitionFromRootViewController
helper method.
*/
open fileprivate(set) var rootViewController: UIViewController!
open internal(set) var rootViewController: UIViewController!
/// The transition type used during a transition.
open var motionTransitionType = MotionTransitionType.fade
/**
An initializer that initializes the object with a NSCoder object.
- Parameter aDecoder: A NSCoder instance.
......@@ -88,45 +128,36 @@ open class RootController: UIViewController {
super.viewWillLayoutSubviews()
layoutSubviews()
}
/**
A method to swap rootViewController objects.
- Parameter toViewController: The UIViewController to swap
with the active rootViewController.
- Parameter duration: A TimeInterval that sets the
animation duration of the transition.
- Parameter options: UIViewAnimationOptions thst are used
when animating the transition from the active rootViewController
to the toViewController.
- Parameter animations: An animation block that is executed during
the transition from the active rootViewController
to the toViewController.
- Parameter completion: A completion block that is execited after
the transition animation from the active rootViewController
to the toViewController has completed.
*/
open func transition(to viewController: UIViewController, duration: TimeInterval = 0.5, options: UIViewAnimationOptions = [], animations: (() -> Void)? = nil, completion: ((Bool) -> Void)? = nil) {
rootViewController.willMove(toParentViewController: nil)
addChildViewController(viewController)
viewController.view.frame = rootViewController.view.frame
transition(from: rootViewController,
to: viewController,
duration: duration,
options: options,
animations: animations) { [weak self, viewController = viewController, completion = completion] (result) in
guard let s = self else {
return
}
viewController.didMove(toParentViewController: s)
s.rootViewController.removeFromParentViewController()
s.rootViewController = viewController
s.rootViewController.view.clipsToBounds = true
s.rootViewController.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
s.rootViewController.view.contentScaleFactor = Screen.scale
s.view.sendSubview(toBack: s.rootViewController.view)
completion?(result)
}
open func transition(to viewController: UIViewController, completion: ((Bool) -> Void)? = nil) {
guard let fvc = rootViewController else {
return
}
let tvc = viewController
tvc.view.isHidden = false
tvc.view.frame = container.bounds
tvc.motionModalTransitionType = motionTransitionType
view.isUserInteractionEnabled = false
Motion.shared.transition(from: fvc, to: tvc, in: container) { [weak self, tvc = tvc, completion = completion] (isFinished) in
guard let s = self else {
return
}
s.rootViewController = tvc
s.view.isUserInteractionEnabled = true
completion?(isFinished)
}
}
/**
......@@ -147,14 +178,25 @@ open class RootController: UIViewController {
view.clipsToBounds = true
view.backgroundColor = .white
view.contentScaleFactor = Screen.scale
prepareContainer()
prepareRootViewController()
}
}
extension RootController {
internal extension TransitionController {
/// Prepares the container view.
func prepareContainer() {
container.frame = view.bounds
container.clipsToBounds = true
container.contentScaleFactor = Screen.scale
container.autoresizingMask = [.flexibleWidth, .flexibleHeight]
view.addSubview(container)
}
/// A method that prepares the rootViewController.
internal func prepareRootViewController() {
prepare(viewController: rootViewController, withContainer: view)
func prepareRootViewController() {
prepare(viewController: rootViewController, in: container)
}
/**
......@@ -162,10 +204,10 @@ extension RootController {
the BarController within the passed in
container view.
- Parameter viewController: A UIViewController to add as a child.
- Parameter withContainer container: A UIView that is the parent of the
- Parameter in container: A UIView that is the parent of the
passed in controller view within the view hierarchy.
*/
internal func prepare(viewController: UIViewController?, withContainer container: UIView) {
func prepare(viewController: UIViewController?, in container: UIView) {
guard let v = viewController else {
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment