├── Example ├── Pods │ ├── Target Support Files │ │ ├── Pods-MLPresentController │ │ │ ├── Pods-MLPresentController.xcconfig │ │ │ ├── Pods-MLPresentController-prefix.pch │ │ │ ├── Pods-MLPresentController-dummy.m │ │ │ └── Pods-MLPresentController-Private.xcconfig │ │ └── Pods │ │ │ ├── Pods-dummy.m │ │ │ ├── Pods.debug.xcconfig │ │ │ ├── Pods.release.xcconfig │ │ │ ├── Pods-environment.h │ │ │ ├── Pods-acknowledgements.markdown │ │ │ ├── Pods-acknowledgements.plist │ │ │ └── Pods-resources.sh │ ├── Headers │ │ ├── Build │ │ │ └── MLPresentController │ │ │ │ ├── MLPresentView.h │ │ │ │ ├── MLPresentController.h │ │ │ │ ├── MLPresentControllerAnimator.h │ │ │ │ ├── UIViewController+MLPresentController.h │ │ │ │ ├── MLRotatePresentControllerAnimator.h │ │ │ │ ├── UIView+FixIOS7BugForMLPresentController.h │ │ │ │ ├── MLPresentControllerInteractiveTransition.h │ │ │ │ └── MLPresentController+PrivatePropertyAndMethod.h │ │ └── Public │ │ │ └── MLPresentController │ │ │ ├── MLPresentView.h │ │ │ ├── MLPresentController.h │ │ │ ├── MLPresentControllerAnimator.h │ │ │ ├── UIViewController+MLPresentController.h │ │ │ ├── MLRotatePresentControllerAnimator.h │ │ │ ├── UIView+FixIOS7BugForMLPresentController.h │ │ │ ├── MLPresentControllerInteractiveTransition.h │ │ │ └── MLPresentController+PrivatePropertyAndMethod.h │ ├── Manifest.lock │ ├── Local Podspecs │ │ └── MLPresentController.podspec │ └── Pods.xcodeproj │ │ ├── xcuserdata │ │ └── molon.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ ├── Pods.xcscheme │ │ │ └── Pods-MLPresentController.xcscheme │ │ └── project.pbxproj ├── Podfile ├── MLPresentController.xcodeproj │ ├── xcuserdata │ │ └── molon.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── MLPresentController.xcscheme │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── MLPresentController.xccheckout │ └── project.pbxproj ├── MLPresentController │ ├── Images.xcassets │ │ ├── LaunchImage.launchimage │ │ │ ├── QQ20141230-2@2x.png │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── ViewController.h │ ├── PresentedViewController2.h │ ├── MLSlidePresentControllerAnimator.h │ ├── AppDelegate.h │ ├── PresentedViewController.h │ ├── main.m │ ├── UIView+Convenience.h │ ├── Info.plist │ ├── PresentedViewController2.m │ ├── AppDelegate.m │ ├── UIView+Convenience.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── MLSlidePresentControllerAnimator.m │ ├── PresentedViewController.m │ └── ViewController.m ├── Podfile.lock ├── MLPresentController.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── MLPresentController.xccheckout └── MLPresentControllerTests │ ├── Info.plist │ └── MLPresentControllerTests.m ├── MLPresentController.gif ├── README.md ├── Classes ├── Animator │ ├── MLRotatePresentControllerAnimator.h │ └── MLRotatePresentControllerAnimator.m ├── MLPresentView.m ├── MLPresentControllerInteractiveTransition.h ├── UIView+FixIOS7BugForMLPresentController.h ├── MLPresentControllerAnimator.h ├── MLPresentView.h ├── MLPresentController.h ├── MLPresentController+PrivatePropertyAndMethod.h ├── UIView+FixIOS7BugForMLPresentController.m ├── MLPresentControllerAnimator.m ├── MLPresentControllerInteractiveTransition.m ├── UIViewController+MLPresentController.h ├── MLPresentController.m └── UIViewController+MLPresentController.m ├── MLPresentController.podspec └── LICENSE /Example/Pods/Target Support Files/Pods-MLPresentController/Pods-MLPresentController.xcconfig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/Pods/Headers/Build/MLPresentController/MLPresentView.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/MLPresentView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/MLPresentController/MLPresentView.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/MLPresentView.h -------------------------------------------------------------------------------- /MLPresentController.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/molon/MLPresentController/HEAD/MLPresentController.gif -------------------------------------------------------------------------------- /Example/Pods/Headers/Build/MLPresentController/MLPresentController.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/MLPresentController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/MLPresentController/MLPresentController.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/MLPresentController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Build/MLPresentController/MLPresentControllerAnimator.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/MLPresentControllerAnimator.h -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform :ios, '7.0' 3 | pod 'MLPresentController', :path => '../' -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/MLPresentController/MLPresentControllerAnimator.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/MLPresentControllerAnimator.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Build/MLPresentController/UIViewController+MLPresentController.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/UIViewController+MLPresentController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/MLPresentController/UIViewController+MLPresentController.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/UIViewController+MLPresentController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Build/MLPresentController/MLRotatePresentControllerAnimator.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/Animator/MLRotatePresentControllerAnimator.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Build/MLPresentController/UIView+FixIOS7BugForMLPresentController.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/UIView+FixIOS7BugForMLPresentController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/MLPresentController/MLRotatePresentControllerAnimator.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/Animator/MLRotatePresentControllerAnimator.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/MLPresentController/UIView+FixIOS7BugForMLPresentController.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/UIView+FixIOS7BugForMLPresentController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Build/MLPresentController/MLPresentControllerInteractiveTransition.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/MLPresentControllerInteractiveTransition.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/MLPresentController/MLPresentControllerInteractiveTransition.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/MLPresentControllerInteractiveTransition.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Build/MLPresentController/MLPresentController+PrivatePropertyAndMethod.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/MLPresentController+PrivatePropertyAndMethod.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/MLPresentController/MLPresentController+PrivatePropertyAndMethod.h: -------------------------------------------------------------------------------- 1 | ../../../../../Classes/MLPresentController+PrivatePropertyAndMethod.h -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MLPresentController/Pods-MLPresentController-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /Example/MLPresentController.xcodeproj/xcuserdata/molon.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Example/MLPresentController/Images.xcassets/LaunchImage.launchimage/QQ20141230-2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/molon/MLPresentController/HEAD/Example/MLPresentController/Images.xcassets/LaunchImage.launchimage/QQ20141230-2@2x.png -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MLPresentController/Pods-MLPresentController-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_MLPresentController : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_MLPresentController 5 | @end 6 | -------------------------------------------------------------------------------- /Example/MLPresentController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | MLPresentController 2 | =================== 3 | 4 | Present ViewController with custom animator. support interactiving with UIPanGestureRecognizer 5 | 6 | 7 | ![MLPresentController](https://raw.githubusercontent.com/molon/MLPresentController/master/MLPresentController.gif) 8 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MLPresentController (1.0) 3 | 4 | DEPENDENCIES: 5 | - MLPresentController (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | MLPresentController: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | MLPresentController: b02dd2b6f200c37671317bb82e1272e8027ea21f 13 | 14 | COCOAPODS: 0.35.0 15 | -------------------------------------------------------------------------------- /Example/MLPresentController/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // MLPresentController 4 | // 5 | // Created by molon on 14/12/30. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MLPresentController (1.0) 3 | 4 | DEPENDENCIES: 5 | - MLPresentController (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | MLPresentController: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | MLPresentController: b02dd2b6f200c37671317bb82e1272e8027ea21f 13 | 14 | COCOAPODS: 0.35.0 15 | -------------------------------------------------------------------------------- /Example/MLPresentController.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/MLPresentController/PresentedViewController2.h: -------------------------------------------------------------------------------- 1 | // 2 | // PresentedViewController2.h 3 | // MLPresentController 4 | // 5 | // Created by molon on 15/1/30. 6 | // Copyright (c) 2015年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PresentedViewController2 : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/MLPresentController/MLSlidePresentControllerAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSlidePresentControllerAnimator.h 3 | // MSHandbook 4 | // 5 | // Created by molon on 15/1/5. 6 | // Copyright (c) 2015年 molon. All rights reserved. 7 | // 8 | 9 | #import "MLPresentControllerAnimator.h" 10 | 11 | @interface MLSlidePresentControllerAnimator : MLPresentControllerAnimator 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/MLPresentController/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MLPresentController 4 | // 5 | // Created by molon on 14/12/30. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Example/MLPresentController/PresentedViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PresentedViewController.h 3 | // MLPresentController 4 | // 5 | // Created by molon on 14/12/30. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PresentedViewController : UIViewController 12 | 13 | @property (nonatomic, assign) BOOL isLocateLeft; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MLPresentController/Pods-MLPresentController-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-MLPresentController.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/MLPresentController" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MLPresentController" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /Classes/Animator/MLRotatePresentControllerAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLRotatePresentControllerAnimator.h 3 | // MSHandbook 4 | // 5 | // Created by molon on 14/12/25. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import "MLPresentControllerAnimator.h" 10 | 11 | @interface MLRotatePresentControllerAnimator : MLPresentControllerAnimator 12 | 13 | @property (nonatomic, assign) BOOL isReverse; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Classes/MLPresentView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLPresentView.m 3 | // MSHandbook 4 | // 5 | // Created by molon on 15/1/17. 6 | // Copyright (c) 2015年 molon. All rights reserved. 7 | // 8 | 9 | #import "MLPresentView.h" 10 | 11 | @implementation MLPresentView 12 | 13 | - (void)setFrame:(CGRect)frame 14 | { 15 | if (self.ignoreSetFrame) { 16 | return; 17 | } 18 | 19 | [super setFrame:frame]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Example/MLPresentController/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MLPresentController 4 | // 5 | // Created by molon on 14/12/30. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MLPresentController" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/MLPresentController" 4 | OTHER_LDFLAGS = -ObjC -l"Pods-MLPresentController" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Classes/MLPresentControllerInteractiveTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLPresentControllerInteractiveTransition.h 3 | // MSHandbook 4 | // 5 | // Created by molon on 14/12/26. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * 修正系统UIPercentDrivenInteractiveTransition的BUG用到,注意此类只支持一次使用。 13 | */ 14 | @interface MLPresentControllerInteractiveTransition : UIPercentDrivenInteractiveTransition 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MLPresentController" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/MLPresentController" 4 | OTHER_LDFLAGS = -ObjC -l"Pods-MLPresentController" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Classes/UIView+FixIOS7BugForMLPresentController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+FixIOS7BugForMLPresentController.h 3 | // MSHandbook 4 | // 5 | // Created by molon on 15/1/17. 6 | // Copyright (c) 2015年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | #define IOS_VERSION_MLPRESENTCONTROLLER ([[[UIDevice currentDevice] systemVersion]floatValue]) 13 | 14 | @interface UIView (FixIOS7BugForMLPresentController) 15 | 16 | @property (nonatomic, assign) BOOL ignoreSetFrame; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Classes/MLPresentControllerAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLPresentControllerAnimator.h 3 | // MSHandbook 4 | // 5 | // Created by molon on 14/12/25. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MLPresentControllerAnimator : NSObject 12 | 13 | @property (nonatomic, assign) BOOL isForInteractiving; 14 | @property (nonatomic, assign) BOOL isForPresent; 15 | @property (nonatomic, assign) NSTimeInterval duration; 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // MLPresentController 10 | #define COCOAPODS_POD_AVAILABLE_MLPresentController 11 | #define COCOAPODS_VERSION_MAJOR_MLPresentController 1 12 | #define COCOAPODS_VERSION_MINOR_MLPresentController 0 13 | #define COCOAPODS_VERSION_PATCH_MLPresentController 0 14 | 15 | -------------------------------------------------------------------------------- /Classes/MLPresentView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLPresentView.h 3 | // MSHandbook 4 | // 5 | // Created by molon on 15/1/17. 6 | // Copyright (c) 2015年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //这个原因是下面,但是现在暂时还是用hook方式吧 12 | /** 13 | * 为了修正iOS7的一个BUG存在的,为了解决BUG,设计上很丑陋啊,如果runtime去hook setFrame的话又怕太降低性能 14 | * 如果在custom frame 的presented vc1上再present一个vc2,vc2dismiss的时候iOS7下会把vc1的orgin设置为CGPointZero,所以如果想避免此种情况,可让vc1.view 设置为MLPresentView即可,其他的都在MLPresentController里内部处理了。 15 | */ 16 | @interface MLPresentView : UIView 17 | 18 | @property (nonatomic, assign) BOOL ignoreSetFrame; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /MLPresentController.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "MLPresentController" 3 | s.version = "1.2.1" 4 | s.summary = "Present ViewController with custom animator and support interactiving with UIPanGestureRecognizer. (iOS 7+)" 5 | 6 | s.homepage = 'https://github.com/molon/MLPresentController' 7 | s.license = { :type => 'MIT'} 8 | s.author = { "molon" => "dudl@qq.com" } 9 | 10 | s.source = { 11 | :git => "https://github.com/molon/MLPresentController.git", 12 | :tag => "#{s.version}" 13 | } 14 | 15 | s.platform = :ios, '7.0' 16 | s.source_files = 'Classes/**/*.{h,m}' 17 | s.requires_arc = true 18 | end -------------------------------------------------------------------------------- /Example/MLPresentController/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "extent" : "full-screen", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "filename" : "QQ20141230-2@2x.png", 15 | "minimum-system-version" : "7.0", 16 | "orientation" : "portrait", 17 | "scale" : "2x" 18 | } 19 | ], 20 | "info" : { 21 | "version" : 1, 22 | "author" : "xcode" 23 | } 24 | } -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/MLPresentController.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "MLPresentController" 3 | s.version = "1.0" 4 | s.summary = "Present ViewController with custom animator and support interactiving with UIPanGestureRecognizer. (iOS 7+)" 5 | 6 | s.homepage = 'https://github.com/molon/MLPresentController' 7 | s.license = { :type => 'MIT'} 8 | s.author = { "molon" => "dudl@qq.com" } 9 | 10 | s.source = { 11 | :git => "https://github.com/molon/MLPresentController.git", 12 | :tag => "#{s.version}" 13 | } 14 | 15 | s.platform = :ios, '7.0' 16 | s.source_files = 'Classes/**/*.{h,m}' 17 | s.requires_arc = true 18 | end -------------------------------------------------------------------------------- /Classes/MLPresentController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLPresentController.h 3 | // MSHandbook 4 | // 5 | // Created by molon on 14/12/25. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MLPresentControllerAnimator.h" 11 | #import "MLRotatePresentControllerAnimator.h" 12 | 13 | /** 14 | * 主要的可使用需要关心的方法在下面这个类目里 15 | */ 16 | #import "UIViewController+MLPresentController.h" 17 | 18 | typedef NS_ENUM(NSUInteger, MLPresentControllerPanDirection) { 19 | MLPresentControllerPanDirectionFromLeft = 0, 20 | MLPresentControllerPanDirectionFromRight, 21 | }; 22 | 23 | @interface MLPresentController : NSObject 24 | 25 | + (instancetype)sharedInstance; 26 | 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Example/MLPresentController.xcodeproj/xcuserdata/molon.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MLPresentController.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 36704ECC1A529AEE00F49044 16 | 17 | primary 18 | 19 | 20 | 36704EE51A529AEE00F49044 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/molon.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-MLPresentController.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods.xcscheme 13 | 14 | isShown 15 | 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | D85CBCC60FB5B032BB55504C 21 | 22 | primary 23 | 24 | 25 | ED4780E59732507BC23F6950 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Example/MLPresentControllerTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.molon.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/MLPresentController/UIView+Convenience.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Convenience.h 3 | // 4 | // Created by Molon on 13/11/12. 5 | // Copyright (c) 2013 Molon. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface UIView (Convenience) 11 | 12 | @property (nonatomic) CGPoint frameOrigin; 13 | @property (nonatomic) CGSize frameSize; 14 | 15 | @property (nonatomic) CGFloat frameX; 16 | @property (nonatomic) CGFloat frameY; 17 | 18 | @property (nonatomic) CGFloat frameRight; 19 | @property (nonatomic) CGFloat frameBottom; 20 | 21 | @property (nonatomic) CGFloat frameWidth; 22 | @property (nonatomic) CGFloat frameHeight; 23 | 24 | - (CGRect)midFrameWithHeight:(CGFloat)height width:(CGFloat)width; 25 | 26 | - (BOOL)containsSubViewOfClassType:(Class)class; 27 | - (void)removeAllSubViews; 28 | 29 | 30 | + (UINib *)nib; 31 | + (instancetype)instanceFromNib; 32 | 33 | 34 | - (void)simpleTransitionWithDuration:(CFTimeInterval)duration andType:(NSString*)type; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Example/MLPresentControllerTests/MLPresentControllerTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLPresentControllerTests.m 3 | // MLPresentControllerTests 4 | // 5 | // Created by molon on 14/12/30. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface MLPresentControllerTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation MLPresentControllerTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 molon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Classes/MLPresentController+PrivatePropertyAndMethod.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLPresentController+PrivatePropertyAndMethod.h 3 | // MSHandbook 4 | // 5 | // Created by molon on 14/12/26. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import "MLPresentController.h" 10 | 11 | @class MLPresentControllerAnimator; 12 | @class MLPresentControllerInteractiveTransition; 13 | @interface MLPresentController (PrivatePropertyAndMethod) 14 | 15 | @property (nonatomic, assign) BOOL isInteractiving; 16 | @property (nonatomic, strong) MLPresentControllerInteractiveTransition *interactiveTransition; 17 | 18 | @property (nonatomic, weak) UIViewController *currentPresentedViewController; 19 | 20 | @property (nonatomic, weak) MLPresentControllerAnimator *animator; 21 | @property (nonatomic, weak) id recordTransitioningDelegate; 22 | @property (nonatomic, assign) UIModalPresentationStyle recordModalPresentationStyle; 23 | @property (nonatomic, assign) MLPresentControllerPanDirection currentPanDirection; 24 | 25 | - (void)recoverPreStateForPresentedViewController; 26 | 27 | //下面三个是为了解决iOS7 BUG而生的,不用太关注 28 | @property (nonatomic, weak) UIViewController *currentPresentingViewController; 29 | @property (nonatomic, assign) UIModalPresentationStyle recordModalPresentationStyleOfPresenting; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## MLPresentController 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2014 molon 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | Generated by CocoaPods - http://cocoapods.org 28 | -------------------------------------------------------------------------------- /Example/MLPresentController/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Example/MLPresentController/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.molon.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarHidden 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Example/MLPresentController.xcworkspace/xcshareddata/MLPresentController.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 7DC87F3B-CF2B-4900-A667-11EC44525A49 9 | IDESourceControlProjectName 10 | MLPresentController 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | ECD585B38833C21A75617D7576E93BFB8BD2B27D 14 | github.com:molon/MLPresentController.git 15 | 16 | IDESourceControlProjectPath 17 | Example/MLPresentController.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | ECD585B38833C21A75617D7576E93BFB8BD2B27D 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | github.com:molon/MLPresentController.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | ECD585B38833C21A75617D7576E93BFB8BD2B27D 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | ECD585B38833C21A75617D7576E93BFB8BD2B27D 36 | IDESourceControlWCCName 37 | MLPresentController 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/MLPresentController.xcodeproj/project.xcworkspace/xcshareddata/MLPresentController.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 37128BEC-9783-4FB5-BBCD-501B977F89B3 9 | IDESourceControlProjectName 10 | MLPresentController 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | ECD585B38833C21A75617D7576E93BFB8BD2B27D 14 | github.com:molon/MLPresentController.git 15 | 16 | IDESourceControlProjectPath 17 | Example/MLPresentController.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | ECD585B38833C21A75617D7576E93BFB8BD2B27D 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | github.com:molon/MLPresentController.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | ECD585B38833C21A75617D7576E93BFB8BD2B27D 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | ECD585B38833C21A75617D7576E93BFB8BD2B27D 36 | IDESourceControlWCCName 37 | MLPresentController 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/MLPresentController/PresentedViewController2.m: -------------------------------------------------------------------------------- 1 | // 2 | // PresentedViewController2.m 3 | // MLPresentController 4 | // 5 | // Created by molon on 15/1/30. 6 | // Copyright (c) 2015年 molon. All rights reserved. 7 | // 8 | 9 | #import "PresentedViewController2.h" 10 | #import "UIView+convenience.h" 11 | #import "MLPresentController.h" 12 | #import "MLSlidePresentControllerAnimator.h" 13 | 14 | @interface PresentedViewController2 () 15 | 16 | @property (nonatomic, strong) UIButton *button; 17 | 18 | @end 19 | 20 | @implementation PresentedViewController2 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | // Do any additional setup after loading the view. 25 | self.view.backgroundColor = [UIColor colorWithRed:1.000 green:0.555 blue:0.458 alpha:1.000]; 26 | [self.view addSubview:self.button]; 27 | } 28 | 29 | - (void)didReceiveMemoryWarning { 30 | [super didReceiveMemoryWarning]; 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | #pragma mark - getter 35 | - (UIButton *)button 36 | { 37 | if (!_button) { 38 | UIButton *button = [[UIButton alloc]init]; 39 | [button setTitle:@"dismiss" forState:UIControlStateNormal]; 40 | [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 41 | [button addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside]; 42 | 43 | _button = button; 44 | } 45 | return _button; 46 | } 47 | 48 | #pragma mark - layout 49 | - (void)viewDidLayoutSubviews 50 | { 51 | [super viewDidLayoutSubviews]; 52 | 53 | self.button.frame = [self.view midFrameWithHeight:30 width:120]; 54 | } 55 | 56 | - (CGRect)ml_preferredFrameForPresentedWithContainerFrame:(CGRect)containerFrame 57 | { 58 | return CGRectInset(containerFrame, 20, 150); 59 | } 60 | 61 | #pragma mark - event 62 | - (void)dismiss 63 | { 64 | MLSlidePresentControllerAnimator *animator = [MLSlidePresentControllerAnimator new]; 65 | animator.isForPresent = NO; 66 | 67 | [self ml_dismissViewControllerWithAnimator:animator completion:nil]; 68 | } 69 | 70 | - (void)didTappedDimmingViewWithGesture:(UITapGestureRecognizer *)tapGesture 71 | { 72 | [self dismiss]; 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/molon.xcuserdatad/xcschemes/Pods.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2014 molon 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | Title 39 | MLPresentController 40 | Type 41 | PSGroupSpecifier 42 | 43 | 44 | FooterText 45 | Generated by CocoaPods - http://cocoapods.org 46 | Title 47 | 48 | Type 49 | PSGroupSpecifier 50 | 51 | 52 | StringsTable 53 | Acknowledgements 54 | Title 55 | Acknowledgements 56 | 57 | 58 | -------------------------------------------------------------------------------- /Classes/UIView+FixIOS7BugForMLPresentController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+FixIOS7BugForMLPresentController.m 3 | // MSHandbook 4 | // 5 | // Created by molon on 15/1/17. 6 | // Copyright (c) 2015年 molon. All rights reserved. 7 | // 8 | 9 | #import "UIView+FixIOS7BugForMLPresentController.h" 10 | #import 11 | 12 | static char ignoreSetFrameKey; 13 | 14 | //静态就交换静态,实例方法就交换实例方法 15 | void Swizzle_FixIOS7BugForMLPresentController(Class c, SEL origSEL, SEL newSEL) 16 | { 17 | //获取实例方法 18 | Method origMethod = class_getInstanceMethod(c, origSEL); 19 | Method newMethod = nil; 20 | if (!origMethod) { 21 | //获取静态方法 22 | origMethod = class_getClassMethod(c, origSEL); 23 | newMethod = class_getClassMethod(c, newSEL); 24 | }else{ 25 | newMethod = class_getInstanceMethod(c, newSEL); 26 | } 27 | 28 | if (!origMethod||!newMethod) { 29 | return; 30 | } 31 | 32 | //自身已经有了就添加不成功,直接交换即可 33 | if(class_addMethod(c, origSEL, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))){ 34 | //添加成功一般情况是因为,origSEL本身是在c的父类里。这里添加成功了一个继承方法。 35 | class_replaceMethod(c, newSEL, method_getImplementation(origMethod), method_getTypeEncoding(origMethod)); 36 | }else{ 37 | method_exchangeImplementations(origMethod, newMethod); 38 | } 39 | } 40 | 41 | @implementation UIView (FixIOS7BugForMLPresentController) 42 | 43 | - (BOOL)ignoreSetFrame 44 | { 45 | return [objc_getAssociatedObject(self, &ignoreSetFrameKey) boolValue] ; 46 | } 47 | 48 | - (void)setIgnoreSetFrame:(BOOL)ignoreSetFrame 49 | { 50 | static NSString * key = @"ignoreSetFrame"; 51 | 52 | [self willChangeValueForKey:key]; 53 | objc_setAssociatedObject(self, &ignoreSetFrameKey, @(ignoreSetFrame), OBJC_ASSOCIATION_RETAIN_NONATOMIC); 54 | [self didChangeValueForKey:key]; 55 | } 56 | 57 | - (void)__MLPresentController__hookSetFrame:(CGRect)frame 58 | { 59 | if (self.ignoreSetFrame) { 60 | return; 61 | } 62 | 63 | [self __MLPresentController__hookSetFrame:frame]; 64 | } 65 | 66 | + (void)load 67 | { 68 | //8.0以后不需要此修正 69 | if (IOS_VERSION_MLPRESENTCONTROLLER<8.0) { 70 | Swizzle_FixIOS7BugForMLPresentController([self class], @selector(setFrame:), @selector(__MLPresentController__hookSetFrame:)); 71 | } 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/molon.xcuserdatad/xcschemes/Pods-MLPresentController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Example/MLPresentController/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // MLPresentController 4 | // 5 | // Created by molon on 14/12/30. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | // Override point for customization after application launch. 21 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 22 | 23 | ViewController *vc = [ViewController new]; 24 | self.window.rootViewController = [[UINavigationController alloc]initWithRootViewController:vc]; 25 | [self.window makeKeyAndVisible]; 26 | 27 | return YES; 28 | } 29 | 30 | - (void)applicationWillResignActive:(UIApplication *)application { 31 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 32 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 33 | } 34 | 35 | - (void)applicationDidEnterBackground:(UIApplication *)application { 36 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 37 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 38 | } 39 | 40 | - (void)applicationWillEnterForeground:(UIApplication *)application { 41 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 42 | } 43 | 44 | - (void)applicationDidBecomeActive:(UIApplication *)application { 45 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 46 | } 47 | 48 | - (void)applicationWillTerminate:(UIApplication *)application { 49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Classes/MLPresentControllerAnimator.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLPresentControllerAnimator.m 3 | // MSHandbook 4 | // 5 | // Created by molon on 14/12/25. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import "MLPresentControllerAnimator.h" 10 | #import "MLPresentController.h" 11 | #import "MLPresentController+PrivatePropertyAndMethod.h" 12 | //#import "MLPresentView.h" 13 | #import "UIView+FixIOS7BugForMLPresentController.h" 14 | 15 | static NSTimeInterval const kDefaultDuration = .25f; 16 | 17 | @implementation MLPresentControllerAnimator 18 | 19 | - (instancetype)init 20 | { 21 | self = [super init]; 22 | if (self) { 23 | _duration = kDefaultDuration; 24 | } 25 | return self; 26 | } 27 | 28 | 29 | #pragma mark - UIViewControllerAnimatedTransitioning 30 | - (NSTimeInterval)transitionDuration:(id)transitionContext 31 | { 32 | return self.duration; 33 | } 34 | 35 | - (void)animateTransition:(id)transitionContext 36 | { 37 | if (IOS_VERSION_MLPRESENTCONTROLLER<8.0) { 38 | if (!self.isForPresent) { 39 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 40 | // if ([toVC.view isKindOfClass:[MLPresentView class]]) { 41 | // ((MLPresentView*)toVC.view).ignoreSetFrame = NO; 42 | // } 43 | toVC.view.ignoreSetFrame = NO; 44 | } 45 | } 46 | } 47 | 48 | - (void)animationEnded:(BOOL)transitionCompleted 49 | { 50 | [[MLPresentController sharedInstance]recoverPreStateForPresentedViewController]; 51 | 52 | //IOS8 暂时不需要修正此BUG,因为后来发现iOS8下在下一次present的时候会dealloc上一次没释放的 53 | if (IOS_VERSION_MLPRESENTCONTROLLER<8.0) { 54 | //注意此修正也仅仅是在keyWindow上 55 | if (!transitionCompleted&&self.isForPresent) { 56 | UIViewController *presentedViewController = [MLPresentController sharedInstance].currentPresentedViewController; 57 | if (presentedViewController) { 58 | //修正UIKit BUG,在cancel之后不释放presentedViewController 59 | UIWindow *window = [UIApplication sharedApplication].keyWindow; 60 | SEL selector = NSSelectorFromString(@"_removeRotationViewController:"); 61 | if ([window respondsToSelector:selector]) { 62 | #pragma clang diagnostic push 63 | #pragma clang diagnostic ignored "-Warc-performSelector-leaks" 64 | [window performSelector:selector withObject:presentedViewController]; 65 | #pragma clang diagnostic pop 66 | } 67 | } 68 | } 69 | } 70 | 71 | [MLPresentController sharedInstance].currentPresentedViewController = nil; 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /Classes/MLPresentControllerInteractiveTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLPresentControllerInteractiveTransition.m 3 | // MSHandbook 4 | // 5 | // Created by molon on 14/12/26. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import "MLPresentControllerInteractiveTransition.h" 10 | 11 | @implementation MLPresentControllerInteractiveTransition 12 | { 13 | BOOL _isStarted; 14 | BOOL _isWrong; 15 | } 16 | 17 | - (CGFloat)completionSpeed 18 | { 19 | CGFloat speed = 1-self.percentComplete; 20 | speed = MAX(speed, 0.001); 21 | speed = MIN(speed, 0.999); 22 | 23 | return speed; 24 | } 25 | 26 | - (void)startInteractiveTransition:(id)transitionContext { 27 | if (_isWrong) { 28 | //这个是因为偶尔第一次开启app时候start有延迟,但是手势callback已经执行了finish等其他然后抬起触摸了,这会莫名延迟的start就没有对应的结束时间引起界面假死 29 | [super startInteractiveTransition:transitionContext]; 30 | 31 | NSLog(@"发现错误,直接结束此次处理开始"); 32 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 33 | [super updateInteractiveTransition:0.01f]; 34 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 35 | [super finishInteractiveTransition]; 36 | NSLog(@"错误结束处理完毕"); 37 | _isWrong = NO; 38 | _isStarted = NO; 39 | }); 40 | }); 41 | [super performSelector:@selector(cancelInteractiveTransition) withObject:nil afterDelay:0.1]; 42 | return; 43 | } 44 | [super startInteractiveTransition:transitionContext]; 45 | 46 | _isStarted = YES; 47 | // NSLog(@"startInteractiveTransition:%p",self); 48 | } 49 | 50 | - (void)finishInteractiveTransition { 51 | if (!_isStarted) { 52 | NSLog(@"未start就finish %p",self); 53 | _isWrong = YES; 54 | return; 55 | } 56 | [super finishInteractiveTransition]; 57 | _isStarted = NO; 58 | // NSLog(@"finishInteractiveTransition:%p",self); 59 | } 60 | 61 | - (void)cancelInteractiveTransition { 62 | if (!_isStarted) { 63 | NSLog(@"未start就cancel %p",self); 64 | _isWrong = YES; 65 | return; 66 | } 67 | [super cancelInteractiveTransition]; 68 | _isStarted = NO; 69 | // NSLog(@"cancelInteractiveTransition:%p",self); 70 | 71 | } 72 | 73 | - (void)updateInteractiveTransition:(CGFloat)percentComplete 74 | { 75 | if (!_isStarted) { 76 | NSLog(@"未start就update %p",self); 77 | _isWrong = YES; 78 | return; 79 | } 80 | [super updateInteractiveTransition:percentComplete]; 81 | // NSLog(@"updateInteractiveTransition %f:%p",percentComplete,self); 82 | } 83 | 84 | @end 85 | -------------------------------------------------------------------------------- /Classes/UIViewController+MLPresentController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MLPresentController.h 3 | // MSHandbook 4 | // 5 | // Created by molon on 14/12/25. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class MLPresentControllerAnimator; 12 | 13 | /** 14 | * 此协议与ml_validatePanGesturePresent方法配合使用 15 | * 切记一定要执行可交互方法 16 | */ 17 | @protocol MLPresentControllerPanDedelagte 18 | 19 | @optional 20 | /** 21 | * pan从左往右开始需要执行的操作,可present或者dismiss,但是切记一定要使用此类支持交互的方法。 22 | */ 23 | - (BOOL)ml_panGestureBeginFromLeft; 24 | /** 25 | * pan从右往左开始需要执行的操作,可present或者dismiss,但是切记一定要使用此类支持交互的方法。 26 | */ 27 | - (BOOL)ml_panGestureBeginFromRight; 28 | 29 | @end 30 | 31 | 32 | @interface UIViewController (MLPresentController) 33 | 34 | 35 | /** 36 | * 通常的present方法,使用MLRotatePresentControllerAnimator动画,不可为交互使用 37 | */ 38 | - (void)ml_presentViewController:(UIViewController *)viewControllerToPresent completion:(void (^)(void))completion; 39 | /** 40 | * 通常的present方法,使用MLRotatePresentControllerAnimator动画,但是可定义interactiving决定是否供交互使用 41 | */ 42 | - (void)ml_presentViewController:(UIViewController *)viewControllerToPresent interactiving:(BOOL)interactiving completion:(void (^)(void))completion; 43 | /** 44 | * present方法,需要传递自定义MLPresentControllerAnimator动画对象,不可为交互使用 45 | */ 46 | - (void)ml_presentViewController:(UIViewController *)viewControllerToPresent animator:(MLPresentControllerAnimator*)animator completion:(void (^)(void))completion; 47 | /** 48 | * present方法,需要传递自定义MLPresentControllerAnimator动画对象,但是可定义interactiving决定是否供交互使用 49 | */ 50 | - (void)ml_presentViewController:(UIViewController *)viewControllerToPresent animator:(MLPresentControllerAnimator*)animator interactiving:(BOOL)interactiving completion:(void (^)(void))completion; 51 | 52 | 53 | /** 54 | * 通常的dismiss方法,使用MLRotatePresentControllerAnimator动画,不可为交互使用 55 | */ 56 | - (void)ml_dismissViewControllerWithCompletion:(void (^)(void))completion; 57 | /** 58 | * 通常的dismiss方法,使用MLRotatePresentControllerAnimator动画,但是可定义interactiving决定是否供交互使用 59 | */ 60 | - (void)ml_dismissViewControllerWithInteractiving:(BOOL)interactiving completion:(void (^)(void))completion; 61 | /** 62 | * dismiss方法,需要传递自定义MLPresentControllerAnimator动画对象,不可为交互使用 63 | */ 64 | - (void)ml_dismissViewControllerWithAnimator:(MLPresentControllerAnimator*)animator completion:(void (^)(void))completion; 65 | /** 66 | * dismiss方法,需要传递自定义MLPresentControllerAnimator动画对象,但是可定义interactiving决定是否供交互使用 67 | */ 68 | - (void)ml_dismissViewControllerWithAnimator:(MLPresentControllerAnimator*)animator interactiving:(BOOL)interactiving completion:(void (^)(void))completion; 69 | 70 | /** 71 | * 对当前self.view添加pan手势,配合MLPresentControllerPanDedelagte协议可开启交互功能 72 | */ 73 | - (void)ml_validatePanGesturePresent; 74 | 75 | /** 76 | * 可对其enabled与否开关pan功能 77 | */ 78 | @property (nonatomic, strong, readonly) UIPanGestureRecognizer *interactivePresentPanGestureRecognizer; 79 | 80 | 81 | //for override 82 | /** 83 | * 默认返回containerView的大小(一般为屏幕大小), 这个是被present的VC需要关心并且继承修改的 84 | */ 85 | - (CGRect)ml_preferredFrameForPresentedWithContainerFrame:(CGRect)containerFrame; 86 | 87 | /** 88 | * 这个是在自定义动画里,如果添加了dimmingView,添加其tap手势可以以此作为action,继承可做自定义实现,一般做dismiss处理 89 | */ 90 | - (void)didTappedDimmingViewWithGesture:(UITapGestureRecognizer*)tapGesture; 91 | 92 | 93 | @end 94 | -------------------------------------------------------------------------------- /Example/MLPresentController/UIView+Convenience.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Convenience.m 3 | // 4 | // Created by Molon on 13/11/12. 5 | // Copyright (c) 2013 Molon. All rights reserved. 6 | // 7 | 8 | #import "UIView+convenience.h" 9 | 10 | @implementation UIView (Convenience) 11 | 12 | - (BOOL)containsSubViewOfClassType:(Class)class { 13 | for (UIView *view in [self subviews]) { 14 | if ([view isMemberOfClass:class]) { 15 | return YES; 16 | } 17 | } 18 | return NO; 19 | } 20 | 21 | - (void)removeAllSubViews { 22 | for (UIView *view in [self subviews]) { 23 | [view removeFromSuperview]; 24 | } 25 | } 26 | 27 | - (CGPoint)frameOrigin { 28 | return self.frame.origin; 29 | } 30 | 31 | - (void)setFrameOrigin:(CGPoint)newOrigin { 32 | self.frame = CGRectMake(newOrigin.x, newOrigin.y, self.frame.size.width, self.frame.size.height); 33 | } 34 | 35 | - (CGSize)frameSize { 36 | return self.frame.size; 37 | } 38 | 39 | - (void)setFrameSize:(CGSize)newSize { 40 | self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, 41 | newSize.width, newSize.height); 42 | } 43 | 44 | - (CGFloat)frameX { 45 | return self.frame.origin.x; 46 | } 47 | 48 | - (void)setFrameX:(CGFloat)newX { 49 | self.frame = CGRectMake(newX, self.frame.origin.y, 50 | self.frame.size.width, self.frame.size.height); 51 | } 52 | 53 | - (CGFloat)frameY { 54 | return self.frame.origin.y; 55 | } 56 | 57 | - (void)setFrameY:(CGFloat)newY { 58 | self.frame = CGRectMake(self.frame.origin.x, newY, 59 | self.frame.size.width, self.frame.size.height); 60 | } 61 | 62 | - (CGFloat)frameRight { 63 | return self.frame.origin.x + self.frame.size.width; 64 | } 65 | 66 | - (void)setFrameRight:(CGFloat)newRight { 67 | self.frame = CGRectMake(newRight - self.frame.size.width, self.frame.origin.y, 68 | self.frame.size.width, self.frame.size.height); 69 | } 70 | 71 | - (CGFloat)frameBottom { 72 | return self.frame.origin.y + self.frame.size.height; 73 | } 74 | 75 | - (void)setFrameBottom:(CGFloat)newBottom { 76 | self.frame = CGRectMake(self.frame.origin.x, newBottom - self.frame.size.height, 77 | self.frame.size.width, self.frame.size.height); 78 | } 79 | 80 | - (CGFloat)frameWidth { 81 | return self.frame.size.width; 82 | } 83 | 84 | - (void)setFrameWidth:(CGFloat)newWidth { 85 | self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, 86 | newWidth, self.frame.size.height); 87 | } 88 | 89 | - (CGFloat)frameHeight { 90 | return self.frame.size.height; 91 | } 92 | 93 | - (void)setFrameHeight:(CGFloat)newHeight { 94 | self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, 95 | self.frame.size.width, newHeight); 96 | } 97 | 98 | 99 | - (CGRect)midFrameWithHeight:(CGFloat)height width:(CGFloat)width 100 | { 101 | return CGRectMake((self.frameWidth-width)/2, (self.frameHeight-height)/2, width, height); 102 | } 103 | 104 | 105 | + (UINib *)nib 106 | { 107 | return [UINib nibWithNibName:NSStringFromClass([self class]) bundle:[NSBundle mainBundle]]; 108 | } 109 | 110 | + (instancetype)instanceFromNib 111 | { 112 | return [[[NSBundle mainBundle]loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil]lastObject]; 113 | } 114 | 115 | 116 | 117 | - (void)simpleTransitionWithDuration:(CFTimeInterval)duration andType:(NSString*)type 118 | { 119 | CATransition *animation = [CATransition animation]; 120 | animation.duration = duration; 121 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 122 | animation.type = type; 123 | [self.layer addAnimation:animation forKey:nil]; 124 | } 125 | 126 | @end 127 | -------------------------------------------------------------------------------- /Example/MLPresentController/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Classes/MLPresentController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLPresentController.m 3 | // MSHandbook 4 | // 5 | // Created by molon on 14/12/25. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import "MLPresentController.h" 10 | #import "MLRotatePresentControllerAnimator.h" 11 | #import "MLPresentControllerInteractiveTransition.h" 12 | #import "UIView+FixIOS7BugForMLPresentController.h" 13 | 14 | @interface MLPresentController() 15 | 16 | @property (nonatomic, assign) BOOL isInteractiving; 17 | @property (nonatomic, strong) MLPresentControllerInteractiveTransition *interactiveTransition; 18 | 19 | @property (nonatomic, weak) UIViewController *currentPresentedViewController; 20 | 21 | @property (nonatomic, weak) MLPresentControllerAnimator *animator; 22 | @property (nonatomic, weak) id recordTransitioningDelegate; 23 | @property (nonatomic, assign) UIModalPresentationStyle recordModalPresentationStyle; 24 | @property (nonatomic, assign) MLPresentControllerPanDirection currentPanDirection; 25 | 26 | 27 | - (void)recoverPreStateForPresentedViewController; 28 | 29 | 30 | //这个玩意只是为了修正下 在custom vc A上再次present custom vc B后,B dismiss会引起A的frame变化为全屏的BUG. 31 | @property (nonatomic, weak) UIViewController *currentPresentingViewController; 32 | @property (nonatomic, assign) UIModalPresentationStyle recordModalPresentationStyleOfPresenting; 33 | 34 | @end 35 | 36 | @implementation MLPresentController 37 | 38 | + (instancetype)sharedInstance { 39 | static MLPresentController *_sharedInstance = nil; 40 | static dispatch_once_t onceToken; 41 | dispatch_once(&onceToken, ^{ 42 | _sharedInstance = [[self class] new]; 43 | }); 44 | return _sharedInstance; 45 | } 46 | 47 | #pragma mark - other 48 | - (void)recoverPreStateForPresentedViewController 49 | { 50 | self.currentPresentedViewController.modalPresentationStyle = self.recordModalPresentationStyle; 51 | self.currentPresentedViewController.transitioningDelegate = self.recordTransitioningDelegate; 52 | 53 | if (IOS_VERSION_MLPRESENTCONTROLLER<8.0f&&self.currentPresentingViewController) { 54 | self.currentPresentingViewController.modalPresentationStyle = self.recordModalPresentationStyleOfPresenting; 55 | 56 | // DLOG(@"recover %@",self.currentPresentingViewController); 57 | } 58 | 59 | self.recordTransitioningDelegate = nil; 60 | self.recordModalPresentationStyle = UIModalPresentationFullScreen; 61 | self.recordModalPresentationStyleOfPresenting = UIModalPresentationFullScreen; 62 | self.isInteractiving = NO; 63 | self.animator = nil; 64 | self.currentPanDirection = MLPresentControllerPanDirectionFromLeft; 65 | 66 | self.currentPresentingViewController = nil; 67 | } 68 | 69 | #pragma mark - delegate 70 | - (id )animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source{ 71 | self.animator.isForPresent = YES; 72 | return self.animator; 73 | } 74 | 75 | - (id )animationControllerForDismissedController:(UIViewController *)dismissed 76 | { 77 | self.animator.isForPresent = NO; 78 | return self.animator; 79 | } 80 | 81 | - (id )interactionControllerForPresentation:(id )animator 82 | { 83 | if ([animator isEqual:self.animator]&&self.animator.isForInteractiving) { 84 | self.interactiveTransition = [MLPresentControllerInteractiveTransition new]; 85 | return self.interactiveTransition; 86 | } 87 | return nil; 88 | } 89 | 90 | - (id )interactionControllerForDismissal:(id )animator 91 | { 92 | if ([animator isEqual:self.animator]&&self.animator.isForInteractiving) { 93 | self.interactiveTransition = [MLPresentControllerInteractiveTransition new]; 94 | return self.interactiveTransition; 95 | } 96 | return nil; 97 | } 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | install_resource() 10 | { 11 | case $1 in 12 | *.storyboard) 13 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 14 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 15 | ;; 16 | *.xib) 17 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 18 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 19 | ;; 20 | *.framework) 21 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 22 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 23 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 24 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 25 | ;; 26 | *.xcdatamodel) 27 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 28 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 29 | ;; 30 | *.xcdatamodeld) 31 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 32 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 33 | ;; 34 | *.xcmappingmodel) 35 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 36 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 37 | ;; 38 | *.xcassets) 39 | ;; 40 | /*) 41 | echo "$1" 42 | echo "$1" >> "$RESOURCES_TO_COPY" 43 | ;; 44 | *) 45 | echo "${PODS_ROOT}/$1" 46 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 47 | ;; 48 | esac 49 | } 50 | 51 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 52 | if [[ "${ACTION}" == "install" ]]; then 53 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 54 | fi 55 | rm -f "$RESOURCES_TO_COPY" 56 | 57 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] 58 | then 59 | case "${TARGETED_DEVICE_FAMILY}" in 60 | 1,2) 61 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 62 | ;; 63 | 1) 64 | TARGET_DEVICE_ARGS="--target-device iphone" 65 | ;; 66 | 2) 67 | TARGET_DEVICE_ARGS="--target-device ipad" 68 | ;; 69 | *) 70 | TARGET_DEVICE_ARGS="--target-device mac" 71 | ;; 72 | esac 73 | find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 74 | fi 75 | -------------------------------------------------------------------------------- /Example/MLPresentController/MLSlidePresentControllerAnimator.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLSlidePresentControllerAnimator.m 3 | // MSHandbook 4 | // 5 | // Created by molon on 15/1/5. 6 | // Copyright (c) 2015年 molon. All rights reserved. 7 | // 8 | 9 | #import "MLSlidePresentControllerAnimator.h" 10 | #import "MLPresentController.h" 11 | 12 | static NSInteger const kDimmingViewTag = 1029; 13 | 14 | @implementation MLSlidePresentControllerAnimator 15 | 16 | - (instancetype)init 17 | { 18 | self = [super init]; 19 | if (self) { 20 | self.duration = 0.20f; 21 | } 22 | return self; 23 | } 24 | 25 | - (void)dealloc 26 | { 27 | // DLOG(@"dealloc %@",NSStringFromClass([self class])); 28 | } 29 | 30 | - (void)animateTransition:(id)transitionContext 31 | { 32 | [super animateTransition:transitionContext]; 33 | 34 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 35 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 36 | UIView *fromView,*toView; 37 | if ([transitionContext respondsToSelector:@selector(viewForKey:)]) { 38 | fromView = [transitionContext viewForKey:UITransitionContextFromViewKey]; 39 | toView = [transitionContext viewForKey:UITransitionContextToViewKey]; 40 | } 41 | fromView = fromView?fromView:fromVC.view; 42 | toView = toView?toView:toVC.view; 43 | UIView *containerView = [transitionContext containerView]; 44 | NSTimeInterval duration = [self transitionDuration:transitionContext]; 45 | 46 | UIViewController *presentedViewController = self.isForPresent?toVC:fromVC; 47 | UIView *presentedView = self.isForPresent?toView:fromView; 48 | 49 | // UIViewController *presentingViewController = self.isForPresent?fromVC:toVC; 50 | // UIView *presentingView = self.isForPresent?fromView:toView; 51 | 52 | UIView *dimmingView = [containerView viewWithTag:kDimmingViewTag]; 53 | 54 | if (self.isForPresent) { 55 | if (!dimmingView) { 56 | dimmingView = [UIView new]; 57 | dimmingView.frame = containerView.bounds; 58 | dimmingView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; 59 | dimmingView.backgroundColor = [UIColor clearColor]; 60 | dimmingView.tag = kDimmingViewTag; 61 | 62 | UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:presentedViewController action:@selector(didTappedDimmingViewWithGesture:)]; 63 | dimmingView.userInteractionEnabled = YES; 64 | [dimmingView addGestureRecognizer:tapGesture]; 65 | 66 | [containerView addSubview:dimmingView]; 67 | } 68 | 69 | presentedView.layer.cornerRadius = 4.0f; 70 | presentedView.clipsToBounds = YES; 71 | 72 | presentedView.frame = [presentedViewController ml_preferredFrameForPresentedWithContainerFrame:containerView.frame]; 73 | [containerView addSubview:presentedView]; 74 | } 75 | 76 | //先搞个简单的放大缩小动画 77 | if (self.isForPresent) { 78 | //从中间展开的动画 79 | presentedView.transform = CGAffineTransformMakeScale(1.0,0.001); 80 | [UIView animateWithDuration:duration delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{ 81 | presentedView.transform = CGAffineTransformIdentity; 82 | } completion:^(BOOL finished) { 83 | if ([transitionContext transitionWasCancelled]) { 84 | [dimmingView removeFromSuperview]; 85 | } 86 | 87 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 88 | }]; 89 | }else{ 90 | [UIView animateWithDuration:duration delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{ 91 | presentedView.transform = CGAffineTransformMakeScale(1.0,0.001); 92 | 93 | } completion: ^(BOOL finished) { 94 | if (![transitionContext transitionWasCancelled]) { 95 | [dimmingView removeFromSuperview]; 96 | [presentedView removeFromSuperview]; 97 | } 98 | 99 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 100 | }]; 101 | } 102 | 103 | } 104 | 105 | @end 106 | -------------------------------------------------------------------------------- /Example/MLPresentController/PresentedViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PresentedViewController.m 3 | // MLPresentController 4 | // 5 | // Created by molon on 14/12/30. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import "PresentedViewController.h" 10 | #import "MLPresentController.h" 11 | #import "UIView+Convenience.h" 12 | #import "PresentedViewController2.h" 13 | #import "MLSlidePresentControllerAnimator.h" 14 | 15 | @interface PresentedViewController () 16 | 17 | @property (nonatomic, strong) UIButton *button; 18 | 19 | @property (nonatomic, strong) UILabel *label; 20 | 21 | @end 22 | 23 | @implementation PresentedViewController 24 | 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | // Do any additional setup after loading the view. 28 | self.view.backgroundColor = [UIColor colorWithRed:0.150 green:0.595 blue:0.583 alpha:1.000]; 29 | [self.view addSubview:self.button]; 30 | [self.view addSubview:self.label]; 31 | 32 | [self ml_validatePanGesturePresent]; 33 | } 34 | 35 | - (void)didReceiveMemoryWarning { 36 | [super didReceiveMemoryWarning]; 37 | // Dispose of any resources that can be recreated. 38 | } 39 | 40 | #pragma mark - getter 41 | - (UIButton *)button 42 | { 43 | if (!_button) { 44 | UIButton *button = [[UIButton alloc]init]; 45 | [button setTitle:[NSString stringWithFormat:@"present vc2"] forState:UIControlStateNormal]; 46 | [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 47 | [button addTarget:self action:@selector(presentVC2) forControlEvents:UIControlEventTouchUpInside]; 48 | 49 | _button = button; 50 | } 51 | return _button; 52 | } 53 | 54 | - (UILabel *)label 55 | { 56 | if (!_label) { 57 | UILabel* label = [[UILabel alloc]init]; 58 | label.backgroundColor = [UIColor clearColor]; 59 | label.textColor = [UIColor whiteColor]; 60 | label.font = [UIFont systemFontOfSize:14.0f]; 61 | label.textAlignment = NSTextAlignmentCenter; 62 | 63 | label.text = [NSString stringWithFormat:@"Pan from %@ to dismiss",!self.isLocateLeft?@"left":@"right"]; 64 | 65 | _label = label; 66 | } 67 | return _label; 68 | } 69 | #pragma mark - layout 70 | - (void)viewDidLayoutSubviews 71 | { 72 | [super viewDidLayoutSubviews]; 73 | 74 | self.label.frame = CGRectMake(0, 30, self.view.frameWidth, 60.0f); 75 | self.button.frame = [self.view midFrameWithHeight:30 width:120]; 76 | } 77 | 78 | - (CGRect)ml_preferredFrameForPresentedWithContainerFrame:(CGRect)containerFrame 79 | { 80 | CGFloat width = containerFrame.size.width; 81 | CGFloat height = containerFrame.size.height; 82 | 83 | #define kSelfWidth 200.0f 84 | #define kSelfHeight 300.0f 85 | // return CGRectMake((width-kSelfWidth)/2, (height-kSelfHeight)/2, kSelfWidth, kSelfHeight); 86 | 87 | if (self.isLocateLeft) { 88 | return CGRectMake(0, (height-kSelfHeight)/2, kSelfWidth, kSelfHeight); 89 | }else{ 90 | return CGRectMake(width-kSelfWidth, (height-kSelfHeight)/2, kSelfWidth, kSelfHeight); 91 | } 92 | } 93 | 94 | #pragma mark - event 95 | - (void)presentVC2 96 | { 97 | PresentedViewController2 *vc = [PresentedViewController2 new]; 98 | 99 | MLSlidePresentControllerAnimator *animator = [MLSlidePresentControllerAnimator new]; 100 | animator.isForPresent = YES; 101 | 102 | [self ml_presentViewController:vc animator:animator completion:nil]; 103 | } 104 | 105 | - (void)dismissWithInteractiving:(BOOL)interactiving 106 | { 107 | MLRotatePresentControllerAnimator *animator = [MLRotatePresentControllerAnimator new]; 108 | animator.isReverse = !self.isLocateLeft; 109 | 110 | [self ml_dismissViewControllerWithAnimator:animator interactiving:interactiving completion:nil]; 111 | } 112 | 113 | - (void)didTappedDimmingViewWithGesture:(UITapGestureRecognizer *)tapGesture 114 | { 115 | [self dismissWithInteractiving:NO]; 116 | } 117 | #pragma mark - pan dismiss 118 | - (BOOL)ml_panGestureBeginFromLeft 119 | { 120 | if (self.isLocateLeft) { 121 | return NO; 122 | } 123 | 124 | [self dismissWithInteractiving:YES]; 125 | 126 | return YES; 127 | } 128 | 129 | - (BOOL)ml_panGestureBeginFromRight 130 | { 131 | if (!self.isLocateLeft) { 132 | return NO; 133 | } 134 | 135 | [self dismissWithInteractiving:YES]; 136 | 137 | return YES; 138 | } 139 | @end 140 | -------------------------------------------------------------------------------- /Example/MLPresentController/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // MLPresentController 4 | // 5 | // Created by molon on 14/12/30. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "UIView+Convenience.h" 11 | #import "MLPresentController.h" 12 | #import "PresentedViewController.h" 13 | 14 | @interface ViewController () 15 | 16 | @property (nonatomic, strong) UIButton *leftButtton; 17 | @property (nonatomic, strong) UIButton *rightButton; 18 | @property (nonatomic, strong) UILabel *label; 19 | 20 | @end 21 | 22 | @implementation ViewController 23 | 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | // Do any additional setup after loading the view, typically from a nib. 27 | self.view.backgroundColor = [UIColor whiteColor]; 28 | self.title = @"MLPresentController"; 29 | 30 | [self.view addSubview:self.label]; 31 | [self.view addSubview:self.leftButtton]; 32 | [self.view addSubview:self.rightButton]; 33 | 34 | [self ml_validatePanGesturePresent]; 35 | } 36 | 37 | - (void)didReceiveMemoryWarning { 38 | [super didReceiveMemoryWarning]; 39 | // Dispose of any resources that can be recreated. 40 | } 41 | 42 | #pragma mark - getter 43 | - (UIButton *)leftButtton 44 | { 45 | if (!_leftButtton) { 46 | UIButton *button = [[UIButton alloc]init]; 47 | [button setTitle:@"left" forState:UIControlStateNormal]; 48 | [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 49 | [button addTarget:self action:@selector(leftPressed) forControlEvents:UIControlEventTouchUpInside]; 50 | 51 | _leftButtton = button; 52 | } 53 | return _leftButtton; 54 | } 55 | 56 | - (UIButton *)rightButton 57 | { 58 | if (!_rightButton) { 59 | UIButton *button = [[UIButton alloc]init]; 60 | [button setTitle:@"right" forState:UIControlStateNormal]; 61 | [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 62 | [button addTarget:self action:@selector(rightPressed) forControlEvents:UIControlEventTouchUpInside]; 63 | 64 | _rightButton = button; 65 | } 66 | return _rightButton; 67 | } 68 | 69 | - (UILabel *)label 70 | { 71 | if (!_label) { 72 | UILabel* label = [[UILabel alloc]init]; 73 | label.backgroundColor = [UIColor clearColor]; 74 | label.textColor = [UIColor blackColor]; 75 | label.font = [UIFont systemFontOfSize:14.0f]; 76 | label.textAlignment = NSTextAlignmentCenter; 77 | 78 | label.text = @"Pan from left or right to present"; 79 | 80 | _label = label; 81 | } 82 | return _label; 83 | } 84 | 85 | #pragma mark - layout 86 | - (void)viewDidLayoutSubviews 87 | { 88 | [super viewDidLayoutSubviews]; 89 | 90 | self.label.frame = CGRectMake(0, 84, self.view.frameWidth, 60); 91 | 92 | #define kButtonWidth 80.0f 93 | #define kButtonHeight 30.0f 94 | 95 | CGRect midFrame = [self.view midFrameWithHeight:kButtonHeight width:kButtonWidth]; 96 | 97 | midFrame.origin.x = 10.0f; 98 | self.leftButtton.frame = midFrame; 99 | 100 | midFrame.origin.x = self.view.frameWidth-10.0f-kButtonWidth; 101 | self.rightButton.frame = midFrame; 102 | } 103 | 104 | #pragma mark - event 105 | 106 | - (void)presentVCWithIsLocateLeft:(BOOL)isLocateLeft interactiving:(BOOL)interactiving 107 | { 108 | PresentedViewController *vc = [PresentedViewController new]; 109 | vc.isLocateLeft = isLocateLeft; 110 | 111 | //You can custom your own animator like MLRotatePresentControllerAnimator 112 | MLRotatePresentControllerAnimator *animator = [MLRotatePresentControllerAnimator new]; 113 | animator.isReverse = !isLocateLeft; 114 | 115 | [self ml_presentViewController:vc animator:animator interactiving:interactiving completion:nil]; 116 | } 117 | 118 | - (void)leftPressed 119 | { 120 | [self presentVCWithIsLocateLeft:YES interactiving:NO]; 121 | } 122 | 123 | - (void)rightPressed 124 | { 125 | [self presentVCWithIsLocateLeft:NO interactiving:NO]; 126 | } 127 | 128 | #pragma mark - pan present 129 | - (BOOL)ml_panGestureBeginFromLeft 130 | { 131 | [self presentVCWithIsLocateLeft:YES interactiving:YES]; 132 | return YES; 133 | } 134 | 135 | - (BOOL)ml_panGestureBeginFromRight 136 | { 137 | [self presentVCWithIsLocateLeft:NO interactiving:YES]; 138 | return YES; 139 | } 140 | 141 | @end 142 | -------------------------------------------------------------------------------- /Example/MLPresentController.xcodeproj/xcuserdata/molon.xcuserdatad/xcschemes/MLPresentController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Classes/Animator/MLRotatePresentControllerAnimator.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLRotatePresentControllerAnimator.m 3 | // MSHandbook 4 | // 5 | // Created by molon on 14/12/25. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import "MLRotatePresentControllerAnimator.h" 10 | #import "MLPresentController.h" 11 | 12 | static NSInteger const kDimmingViewTag = 1024; 13 | 14 | @implementation MLRotatePresentControllerAnimator 15 | 16 | - (void)dealloc 17 | { 18 | // DLOG(@"dealloc %@",NSStringFromClass([self class])); 19 | } 20 | 21 | - (void)animateTransition:(id)transitionContext 22 | { 23 | [super animateTransition:transitionContext]; 24 | 25 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 26 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 27 | UIView *fromView,*toView; 28 | if ([transitionContext respondsToSelector:@selector(viewForKey:)]) { 29 | fromView = [transitionContext viewForKey:UITransitionContextFromViewKey]; 30 | toView = [transitionContext viewForKey:UITransitionContextToViewKey]; 31 | } 32 | fromView = fromView?fromView:fromVC.view; 33 | toView = toView?toView:toVC.view; 34 | 35 | UIView *containerView = [transitionContext containerView]; 36 | NSTimeInterval duration = [self transitionDuration:transitionContext]; 37 | 38 | UIViewController *presentedViewController = self.isForPresent?toVC:fromVC; 39 | UIView *presentedView = self.isForPresent?toView:fromView; 40 | // UIView *presentingView = self.isForPresent?fromView:toView; 41 | 42 | UIView *dimmingView = [containerView viewWithTag:kDimmingViewTag]; 43 | 44 | if (self.isForPresent) { 45 | if (!dimmingView) { 46 | dimmingView = [UIView new]; 47 | dimmingView.frame = containerView.bounds; 48 | dimmingView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; 49 | dimmingView.backgroundColor = [UIColor blackColor]; 50 | dimmingView.alpha = 0.01; 51 | dimmingView.tag = kDimmingViewTag; 52 | 53 | UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:presentedViewController action:@selector(didTappedDimmingViewWithGesture:)]; 54 | dimmingView.userInteractionEnabled = YES; 55 | [dimmingView addGestureRecognizer:tapGesture]; 56 | 57 | [containerView addSubview:dimmingView]; 58 | } 59 | 60 | presentedView.layer.cornerRadius = 4.0f; 61 | presentedView.clipsToBounds = YES; 62 | 63 | presentedView.frame = [presentedViewController ml_preferredFrameForPresentedWithContainerFrame:containerView.frame]; 64 | [containerView addSubview:presentedView]; 65 | } 66 | 67 | [self changeAnchorPointY:CGRectGetHeight(containerView.frame)*2/CGRectGetHeight(presentedView.frame) andAdjustPositionForView:presentedView]; 68 | 69 | CGFloat maxFeatAngle = [self maxFeatRangleForView:presentedView withFeatContainerView:containerView]; 70 | 71 | if (self.isForPresent) { 72 | [self moveViewWithX:self.isReverse?CGRectGetWidth(containerView.frame)/2:-CGRectGetWidth(containerView.frame)/2 forView:presentedView withMaxFeatRangle:maxFeatAngle andFeatContainerView:containerView]; 73 | 74 | //sorry, spring animator is not allowed 75 | // [UIView animateWithDuration:0.5f delay:0.0f usingSpringWithDamping:0.8f initialSpringVelocity:0.6f options:UIViewAnimationOptionCurveEaseIn animations:^{ 76 | [UIView animateWithDuration:duration delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{ 77 | [self moveViewWithX:0 forView:presentedView withMaxFeatRangle:maxFeatAngle andFeatContainerView:containerView]; 78 | 79 | dimmingView.alpha = 0.35f; 80 | } completion:^(BOOL finished) { 81 | // NSLog(@"animator present end"); 82 | presentedView.transform = CGAffineTransformIdentity; 83 | 84 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 85 | 86 | if ([transitionContext transitionWasCancelled]) { 87 | [dimmingView removeFromSuperview]; 88 | } 89 | }]; 90 | }else{ 91 | [UIView animateWithDuration:duration delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{ 92 | [self moveViewWithX:self.isReverse?CGRectGetWidth(containerView.frame)/2:-CGRectGetWidth(containerView.frame)/2 forView:presentedView withMaxFeatRangle:maxFeatAngle andFeatContainerView:containerView]; 93 | 94 | dimmingView.alpha = 0.01; 95 | } completion: ^(BOOL finished) { 96 | // NSLog(@"animator dismiss end"); 97 | if (![transitionContext transitionWasCancelled]) { 98 | [dimmingView removeFromSuperview]; 99 | [presentedView removeFromSuperview]; 100 | } 101 | 102 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; 103 | }]; 104 | } 105 | 106 | } 107 | 108 | 109 | - (void)moveViewWithX:(float)x forView:(UIView*)view withMaxFeatRangle:(CGFloat)maxFeatRangle andFeatContainerView:(UIView*)containerView 110 | { 111 | CATransform3D transform = CATransform3DIdentity; 112 | transform = CATransform3DRotate(transform,maxFeatRangle*(x/(CGRectGetWidth(containerView.frame)/2)), 0, 0, 1); 113 | [view.layer setTransform:transform]; 114 | } 115 | 116 | 117 | - (void)changeAnchorPointY:(CGFloat)anchorPointY andAdjustPositionForView:(UIView*)view 118 | { 119 | NSAssert(anchorPointY>1, @"anchorPoint必须大于1才OK"); 120 | 121 | CALayer *layer = [view layer]; 122 | CGPoint oldAnchorPoint = layer.anchorPoint; 123 | [layer setAnchorPoint:CGPointMake(oldAnchorPoint.x, anchorPointY)]; 124 | [layer setPosition:CGPointMake(layer.position.x + layer.bounds.size.width * (layer.anchorPoint.x - oldAnchorPoint.x), layer.position.y + layer.bounds.size.height * (layer.anchorPoint.y - oldAnchorPoint.y))]; 125 | } 126 | 127 | - (CGFloat)maxFeatRangleForView:(UIView*)view withFeatContainerView:(UIView*)containerView 128 | { 129 | NSAssert(view.layer.anchorPoint.y>1, @"anchorPoint必须大于1才OK"); 130 | 131 | CGFloat halfViewWidth = (CGRectGetWidth(view.frame)/2); 132 | 133 | NSAssert([view.window isEqual:containerView.window], @"containerView和view必须在同一window里"); 134 | 135 | CGRect inFrame = [view convertRect:view.bounds toView:containerView]; 136 | NSAssert(!CGRectEqualToRect(inFrame, CGRectZero), @"view大小不能等于CGRectZero"); 137 | 138 | //判断下左右空间哪个小点。取小的空间宽度+view宽度一半 139 | CGFloat containerExtraWidth = halfViewWidth; 140 | if (inFrame.origin.x > CGRectGetWidth(containerView.frame)-inFrame.origin.x-inFrame.size.width) { 141 | containerExtraWidth += CGRectGetWidth(containerView.frame)-inFrame.origin.x-inFrame.size.width; 142 | }else{ 143 | containerExtraWidth += inFrame.origin.x; 144 | } 145 | 146 | //找到角度范围 147 | CGFloat r = CGRectGetHeight(view.frame)*(view.layer.anchorPoint.y-1); 148 | //view一半的角度 149 | CGFloat angle1 = atan(halfViewWidth/r); 150 | CGFloat calcRadius = sqrt(r*r+halfViewWidth*halfViewWidth); 151 | 152 | //额外container空间的角度 153 | CGFloat angle2 = asin(containerExtraWidth/calcRadius); 154 | NSAssert(angle2<=1, @"请增大anchorPoint.y或者减少containerView宽度或者增大presentedView宽度"); 155 | 156 | CGFloat angle = angle1+angle2; 157 | 158 | return angle; 159 | } 160 | 161 | @end 162 | -------------------------------------------------------------------------------- /Classes/UIViewController+MLPresentController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MLPresentController.m 3 | // MSHandbook 4 | // 5 | // Created by molon on 14/12/25. 6 | // Copyright (c) 2014年 molon. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+MLPresentController.h" 10 | #import "MLPresentController.h" 11 | #import "MLPresentControllerAnimator.h" 12 | #import "MLPresentControllerInteractiveTransition.h" 13 | #import "MLPresentController+PrivatePropertyAndMethod.h" 14 | #import 15 | #import "UIView+FixIOS7BugForMLPresentController.h" 16 | 17 | static char interactivePresentPanGestureRecognizerKey; 18 | 19 | @interface UIViewController() 20 | 21 | @property (nonatomic, strong) UIPanGestureRecognizer *interactivePresentPanGestureRecognizer; 22 | 23 | @end 24 | 25 | @implementation UIViewController (MLRotatePresentController) 26 | 27 | - (void)ml_presentViewController:(UIViewController *)viewControllerToPresent completion:(void (^)(void))completion 28 | { 29 | [self ml_presentViewController:viewControllerToPresent interactiving:NO completion:completion]; 30 | } 31 | 32 | - (void)ml_presentViewController:(UIViewController *)viewControllerToPresent interactiving:(BOOL)interactiving completion:(void (^)(void))completion 33 | { 34 | [self ml_presentViewController:viewControllerToPresent animator:nil interactiving:interactiving completion:completion]; 35 | } 36 | 37 | - (void)ml_presentViewController:(UIViewController *)viewControllerToPresent animator:(MLPresentControllerAnimator*)animator completion:(void (^)(void))completion 38 | { 39 | [self ml_presentViewController:viewControllerToPresent animator:animator interactiving:NO completion:completion]; 40 | } 41 | 42 | - (void)ml_presentViewController:(UIViewController *)viewControllerToPresent animator:(MLPresentControllerAnimator*)animator interactiving:(BOOL)interactiving completion:(void (^)(void))completion 43 | { 44 | if (!animator) { 45 | animator = [MLRotatePresentControllerAnimator new]; 46 | } 47 | 48 | animator.isForInteractiving = interactiving; 49 | 50 | MLPresentController *pc = [MLPresentController sharedInstance]; 51 | pc.animator = animator; 52 | 53 | pc.recordTransitioningDelegate = viewControllerToPresent.transitioningDelegate; 54 | pc.recordModalPresentationStyle = viewControllerToPresent.modalPresentationStyle; 55 | pc.currentPresentedViewController = viewControllerToPresent; 56 | 57 | viewControllerToPresent.transitioningDelegate = pc; 58 | 59 | viewControllerToPresent.modalPresentationStyle = UIModalPresentationCustom; 60 | 61 | [self presentViewController:viewControllerToPresent animated:YES completion:completion]; 62 | } 63 | 64 | 65 | - (void)ml_dismissViewControllerWithCompletion:(void (^)(void))completion 66 | { 67 | [self ml_dismissViewControllerWithInteractiving:NO completion:completion]; 68 | } 69 | 70 | - (void)ml_dismissViewControllerWithInteractiving:(BOOL)interactiving completion:(void (^)(void))completion 71 | { 72 | [self ml_dismissViewControllerWithAnimator:nil interactiving:interactiving completion:completion]; 73 | } 74 | 75 | - (void)ml_dismissViewControllerWithAnimator:(MLPresentControllerAnimator*)animator completion:(void (^)(void))completion 76 | { 77 | [self ml_dismissViewControllerWithAnimator:animator interactiving:NO completion:completion]; 78 | } 79 | 80 | - (void)ml_dismissViewControllerWithAnimator:(MLPresentControllerAnimator*)animator interactiving:(BOOL)interactiving completion:(void (^)(void))completion 81 | { 82 | if (!animator) { 83 | animator = [MLRotatePresentControllerAnimator new]; 84 | } 85 | 86 | //找到presented vc 87 | UIViewController *viewControllerToPresent; 88 | if (self.presentingViewController) { 89 | viewControllerToPresent = self; 90 | }else if (self.presentedViewController) { 91 | viewControllerToPresent = self.presentedViewController; 92 | }else{ 93 | [self dismissViewControllerAnimated:YES completion:completion]; 94 | return; 95 | } 96 | 97 | animator.isForInteractiving = interactiving; 98 | 99 | MLPresentController *pc = [MLPresentController sharedInstance]; 100 | pc.animator = animator; 101 | 102 | pc.recordTransitioningDelegate = viewControllerToPresent.transitioningDelegate; 103 | pc.recordModalPresentationStyle = viewControllerToPresent.modalPresentationStyle; 104 | 105 | viewControllerToPresent.transitioningDelegate = pc; 106 | viewControllerToPresent.modalPresentationStyle = UIModalPresentationCustom; 107 | 108 | //这里在iOS7下需要设置为custom 109 | if (IOS_VERSION_MLPRESENTCONTROLLER<8.0) { 110 | pc.currentPresentingViewController = viewControllerToPresent.presentingViewController; 111 | 112 | pc.recordModalPresentationStyleOfPresenting = viewControllerToPresent.presentingViewController.modalPresentationStyle; 113 | pc.currentPresentingViewController.modalPresentationStyle = UIModalPresentationCustom; 114 | 115 | // if ([pc.currentPresentingViewController.view isKindOfClass:[MLPresentView class]]) { 116 | // ((MLPresentView*)pc.currentPresentingViewController.view).ignoreSetFrame = YES; 117 | // } 118 | pc.currentPresentingViewController.view.ignoreSetFrame = YES; 119 | } 120 | 121 | [viewControllerToPresent dismissViewControllerAnimated:YES completion:completion]; 122 | } 123 | 124 | //继承以修改,显示的时候的合适位置 125 | - (CGRect)ml_preferredFrameForPresentedWithContainerFrame:(CGRect)containerFrame 126 | { 127 | return CGRectMake(0, 0, containerFrame.size.width, containerFrame.size.height); 128 | } 129 | 130 | 131 | - (void)didTappedDimmingViewWithGesture:(UITapGestureRecognizer*)tapGesture 132 | { 133 | //可以啥都不做 134 | } 135 | 136 | #pragma mark - Interactive 137 | - (void)ml_validatePanGesturePresent 138 | { 139 | NSAssert([self conformsToProtocol:@protocol(MLPresentControllerPanDedelagte)], @"使用ml_validatePanGesturePresent功能必须实现MLPresentControllerPanDedelagte协议"); 140 | 141 | if (self.interactivePresentPanGestureRecognizer) { 142 | return; 143 | } 144 | 145 | UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(ml_panGesturePresentCallback:)]; 146 | [self.view addGestureRecognizer:recognizer]; 147 | self.interactivePresentPanGestureRecognizer = recognizer; 148 | } 149 | 150 | - (UIPanGestureRecognizer *)interactivePresentPanGestureRecognizer 151 | { 152 | return objc_getAssociatedObject(self, &interactivePresentPanGestureRecognizerKey); 153 | } 154 | 155 | - (void)setInteractivePresentPanGestureRecognizer:(UIPanGestureRecognizer *)interactivePresentPanGestureRecognizer 156 | { 157 | static NSString * key = @"interactivePresentPanGestureRecognizer"; 158 | 159 | [self willChangeValueForKey:key]; 160 | objc_setAssociatedObject(self, &interactivePresentPanGestureRecognizerKey, interactivePresentPanGestureRecognizer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 161 | [self didChangeValueForKey:key]; 162 | } 163 | 164 | - (BOOL)ml_panGestureBeginFromLeft 165 | { 166 | return NO; 167 | } 168 | 169 | - (BOOL)ml_panGestureBeginFromRight 170 | { 171 | return NO; 172 | } 173 | 174 | #pragma mark - pan callback 175 | - (void)ml_panGesturePresentCallback:(UIPanGestureRecognizer*)recognizer 176 | { 177 | UIView *view = recognizer.view; 178 | 179 | if (recognizer.state == UIGestureRecognizerStateBegan&&![self.transitionCoordinator isAnimated]) { 180 | if ([recognizer velocityInView:view].x>0) { 181 | if ([self ml_panGestureBeginFromLeft]) { 182 | NSAssert([self.transitionCoordinator isAnimated], @"必须执行animate的present或者dismiss方法"); 183 | MLPresentControllerAnimator *animator = [MLPresentController sharedInstance].animator; 184 | NSAssert(animator.isForInteractiving, @"必须给予可交互动画对象"); 185 | 186 | if ([self.transitionCoordinator isAnimated]&&animator.isForInteractiving) { 187 | [MLPresentController sharedInstance].currentPanDirection = MLPresentControllerPanDirectionFromLeft; 188 | [MLPresentController sharedInstance].isInteractiving = YES; 189 | 190 | // DLOG(@"FromLeft present %p",self); 191 | } 192 | 193 | return; 194 | } 195 | }else if ([recognizer velocityInView:view].x<0) { 196 | if ([self ml_panGestureBeginFromRight]) { 197 | 198 | NSAssert([self.transitionCoordinator isAnimated], @"必须执行animate的present或者dismiss方法"); 199 | MLPresentControllerAnimator *animator = [MLPresentController sharedInstance].animator; 200 | NSAssert(animator.isForInteractiving, @"必须给予可交互动画对象"); 201 | 202 | if ([self.transitionCoordinator isAnimated]&&animator.isForInteractiving) { 203 | [MLPresentController sharedInstance].currentPanDirection = MLPresentControllerPanDirectionFromRight; 204 | [MLPresentController sharedInstance].isInteractiving = YES; 205 | 206 | // DLOG(@"FromRight present %p",self); 207 | } 208 | return; 209 | } 210 | } 211 | return; 212 | } 213 | 214 | if (![MLPresentController sharedInstance].isInteractiving) { 215 | return; 216 | } 217 | 218 | #define IS_FROM_LEFT ([MLPresentController sharedInstance].currentPanDirection == MLPresentControllerPanDirectionFromLeft) 219 | 220 | CGFloat progress = (IS_FROM_LEFT?[recognizer translationInView:view].x:-[recognizer translationInView:view].x) / (view.bounds.size.width * 1.0f); 221 | progress = MIN(1.0, MAX(0.0, progress)); 222 | 223 | if (recognizer.state == UIGestureRecognizerStateChanged) { 224 | //因为上下距离太多,所以取消 225 | if (fabs([recognizer translationInView:view].y)>200.0f) { 226 | // NSLog(@"因为上下距离太多,所以取消"); 227 | [[MLPresentController sharedInstance].interactiveTransition cancelInteractiveTransition]; 228 | [MLPresentController sharedInstance].isInteractiving = NO; 229 | }else{ 230 | //中途上下速率太快就认为想取消 231 | CGPoint velocity = [recognizer velocityInView:view]; 232 | if (fabs(velocity.y)>500.0f) { 233 | //检测和x速率的比例是不是inf,是的话,说明明显有向下移动的痕迹 234 | velocity.x = velocity.x==0?0.000001f:velocity.x; 235 | if (isinf(fabs(velocity.y)/fabs(velocity.x))) { 236 | // NSLog(@"因为上下速率太快,所以取消"); 237 | [[MLPresentController sharedInstance].interactiveTransition cancelInteractiveTransition]; 238 | [MLPresentController sharedInstance].isInteractiving = NO; 239 | } 240 | } 241 | } 242 | 243 | if ([MLPresentController sharedInstance].isInteractiving) { 244 | progress = MIN(0.999, progress); 245 | progress = MAX(0.001, progress); 246 | //纠正progress原因:详情见https://github.com/ColinEberhardt/VCTransitionsLibrary/issues/4 247 | [[MLPresentController sharedInstance].interactiveTransition updateInteractiveTransition:progress]; 248 | } 249 | }else if ((recognizer.state == UIGestureRecognizerStateEnded || recognizer.state == UIGestureRecognizerStateCancelled)) { 250 | //结束或者取消了手势,根据方向和速率来判断应该完成transition还是取消transition 251 | CGFloat velocityX = [recognizer velocityInView:view].x; //我们只关心x的速率 252 | 253 | velocityX = IS_FROM_LEFT?velocityX:-velocityX; 254 | 255 | #define kTooFastVelocity 350.0f 256 | if (velocityX > kTooFastVelocity) { //向右速率太快就完成 257 | [[MLPresentController sharedInstance].interactiveTransition finishInteractiveTransition]; 258 | }else if (velocityX < -kTooFastVelocity){ //向左速率太快就取消 259 | [[MLPresentController sharedInstance].interactiveTransition cancelInteractiveTransition]; 260 | }else{ 261 | if (progress > 0.7f || (progress>=0.10f&&velocityX>0.0f)) { 262 | [[MLPresentController sharedInstance].interactiveTransition finishInteractiveTransition]; 263 | }else{ 264 | [[MLPresentController sharedInstance].interactiveTransition cancelInteractiveTransition]; 265 | } 266 | } 267 | [MLPresentController sharedInstance].isInteractiving = NO; 268 | } 269 | 270 | } 271 | 272 | @end 273 | -------------------------------------------------------------------------------- /Example/MLPresentController.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 20F68BA8687BB1327952181C /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0FC45D771DEB4DEFE4436FD2 /* libPods.a */; }; 11 | 3617719F1A7B291B00D8F8B2 /* PresentedViewController2.m in Sources */ = {isa = PBXBuildFile; fileRef = 3617719E1A7B291B00D8F8B2 /* PresentedViewController2.m */; }; 12 | 361771A21A7B30CF00D8F8B2 /* MLSlidePresentControllerAnimator.m in Sources */ = {isa = PBXBuildFile; fileRef = 361771A11A7B30CF00D8F8B2 /* MLSlidePresentControllerAnimator.m */; }; 13 | 361771A81A7B420000D8F8B2 /* UIView+Convenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 361771A71A7B420000D8F8B2 /* UIView+Convenience.m */; }; 14 | 36537B4A1A529F390006DBE0 /* PresentedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 36537B491A529F390006DBE0 /* PresentedViewController.m */; }; 15 | 36704ED31A529AEE00F49044 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 36704ED21A529AEE00F49044 /* main.m */; }; 16 | 36704ED61A529AEE00F49044 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 36704ED51A529AEE00F49044 /* AppDelegate.m */; }; 17 | 36704ED91A529AEE00F49044 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 36704ED81A529AEE00F49044 /* ViewController.m */; }; 18 | 36704EDE1A529AEE00F49044 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 36704EDD1A529AEE00F49044 /* Images.xcassets */; }; 19 | 36704EE11A529AEE00F49044 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 36704EDF1A529AEE00F49044 /* LaunchScreen.xib */; }; 20 | 36704EED1A529AEE00F49044 /* MLPresentControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 36704EEC1A529AEE00F49044 /* MLPresentControllerTests.m */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 36704EE71A529AEE00F49044 /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = 36704EC51A529AEE00F49044 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 36704ECC1A529AEE00F49044; 29 | remoteInfo = MLPresentController; 30 | }; 31 | /* End PBXContainerItemProxy section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 0FC45D771DEB4DEFE4436FD2 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 3617719D1A7B291B00D8F8B2 /* PresentedViewController2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresentedViewController2.h; sourceTree = ""; }; 36 | 3617719E1A7B291B00D8F8B2 /* PresentedViewController2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PresentedViewController2.m; sourceTree = ""; }; 37 | 361771A01A7B30CF00D8F8B2 /* MLSlidePresentControllerAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLSlidePresentControllerAnimator.h; sourceTree = ""; }; 38 | 361771A11A7B30CF00D8F8B2 /* MLSlidePresentControllerAnimator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLSlidePresentControllerAnimator.m; sourceTree = ""; }; 39 | 361771A61A7B420000D8F8B2 /* UIView+Convenience.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Convenience.h"; sourceTree = ""; }; 40 | 361771A71A7B420000D8F8B2 /* UIView+Convenience.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Convenience.m"; sourceTree = ""; }; 41 | 36537B481A529F390006DBE0 /* PresentedViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresentedViewController.h; sourceTree = ""; }; 42 | 36537B491A529F390006DBE0 /* PresentedViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PresentedViewController.m; sourceTree = ""; }; 43 | 36704ECD1A529AEE00F49044 /* MLPresentController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MLPresentController.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 36704ED11A529AEE00F49044 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | 36704ED21A529AEE00F49044 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 46 | 36704ED41A529AEE00F49044 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 47 | 36704ED51A529AEE00F49044 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 48 | 36704ED71A529AEE00F49044 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 49 | 36704ED81A529AEE00F49044 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 50 | 36704EDD1A529AEE00F49044 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 51 | 36704EE01A529AEE00F49044 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 52 | 36704EE61A529AEE00F49044 /* MLPresentControllerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MLPresentControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 36704EEB1A529AEE00F49044 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | 36704EEC1A529AEE00F49044 /* MLPresentControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MLPresentControllerTests.m; sourceTree = ""; }; 55 | 89977BC972E8DD8C37C335CB /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; 56 | F4601CFA969053865CB7533B /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 36704ECA1A529AEE00F49044 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | 20F68BA8687BB1327952181C /* libPods.a in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | 36704EE31A529AEE00F49044 /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | 361771C31A7B524300D8F8B2 /* CustomAnimator */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 361771A01A7B30CF00D8F8B2 /* MLSlidePresentControllerAnimator.h */, 82 | 361771A11A7B30CF00D8F8B2 /* MLSlidePresentControllerAnimator.m */, 83 | ); 84 | name = CustomAnimator; 85 | sourceTree = ""; 86 | }; 87 | 36704EC41A529AEE00F49044 = { 88 | isa = PBXGroup; 89 | children = ( 90 | 36704ECF1A529AEE00F49044 /* MLPresentController */, 91 | 36704EE91A529AEE00F49044 /* MLPresentControllerTests */, 92 | 36704ECE1A529AEE00F49044 /* Products */, 93 | 679B8D12AA05734525E7B247 /* Pods */, 94 | 4D1046D2ED42617A6F1EA4FA /* Frameworks */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 36704ECE1A529AEE00F49044 /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 36704ECD1A529AEE00F49044 /* MLPresentController.app */, 102 | 36704EE61A529AEE00F49044 /* MLPresentControllerTests.xctest */, 103 | ); 104 | name = Products; 105 | sourceTree = ""; 106 | }; 107 | 36704ECF1A529AEE00F49044 /* MLPresentController */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 361771C31A7B524300D8F8B2 /* CustomAnimator */, 111 | 36537B481A529F390006DBE0 /* PresentedViewController.h */, 112 | 36537B491A529F390006DBE0 /* PresentedViewController.m */, 113 | 3617719D1A7B291B00D8F8B2 /* PresentedViewController2.h */, 114 | 3617719E1A7B291B00D8F8B2 /* PresentedViewController2.m */, 115 | 36704ED41A529AEE00F49044 /* AppDelegate.h */, 116 | 36704ED51A529AEE00F49044 /* AppDelegate.m */, 117 | 36704ED71A529AEE00F49044 /* ViewController.h */, 118 | 36704ED81A529AEE00F49044 /* ViewController.m */, 119 | 361771A61A7B420000D8F8B2 /* UIView+Convenience.h */, 120 | 361771A71A7B420000D8F8B2 /* UIView+Convenience.m */, 121 | 36704EDD1A529AEE00F49044 /* Images.xcassets */, 122 | 36704EDF1A529AEE00F49044 /* LaunchScreen.xib */, 123 | 36704ED01A529AEE00F49044 /* Supporting Files */, 124 | ); 125 | path = MLPresentController; 126 | sourceTree = ""; 127 | }; 128 | 36704ED01A529AEE00F49044 /* Supporting Files */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 36704ED11A529AEE00F49044 /* Info.plist */, 132 | 36704ED21A529AEE00F49044 /* main.m */, 133 | ); 134 | name = "Supporting Files"; 135 | sourceTree = ""; 136 | }; 137 | 36704EE91A529AEE00F49044 /* MLPresentControllerTests */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 36704EEC1A529AEE00F49044 /* MLPresentControllerTests.m */, 141 | 36704EEA1A529AEE00F49044 /* Supporting Files */, 142 | ); 143 | path = MLPresentControllerTests; 144 | sourceTree = ""; 145 | }; 146 | 36704EEA1A529AEE00F49044 /* Supporting Files */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 36704EEB1A529AEE00F49044 /* Info.plist */, 150 | ); 151 | name = "Supporting Files"; 152 | sourceTree = ""; 153 | }; 154 | 4D1046D2ED42617A6F1EA4FA /* Frameworks */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 0FC45D771DEB4DEFE4436FD2 /* libPods.a */, 158 | ); 159 | name = Frameworks; 160 | sourceTree = ""; 161 | }; 162 | 679B8D12AA05734525E7B247 /* Pods */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | 89977BC972E8DD8C37C335CB /* Pods.debug.xcconfig */, 166 | F4601CFA969053865CB7533B /* Pods.release.xcconfig */, 167 | ); 168 | name = Pods; 169 | sourceTree = ""; 170 | }; 171 | /* End PBXGroup section */ 172 | 173 | /* Begin PBXNativeTarget section */ 174 | 36704ECC1A529AEE00F49044 /* MLPresentController */ = { 175 | isa = PBXNativeTarget; 176 | buildConfigurationList = 36704EF01A529AEE00F49044 /* Build configuration list for PBXNativeTarget "MLPresentController" */; 177 | buildPhases = ( 178 | A347D601E9E9249F3B4E7696 /* Check Pods Manifest.lock */, 179 | 36704EC91A529AEE00F49044 /* Sources */, 180 | 36704ECA1A529AEE00F49044 /* Frameworks */, 181 | 36704ECB1A529AEE00F49044 /* Resources */, 182 | 28C3600F8D3A615657755C69 /* Copy Pods Resources */, 183 | ); 184 | buildRules = ( 185 | ); 186 | dependencies = ( 187 | ); 188 | name = MLPresentController; 189 | productName = MLPresentController; 190 | productReference = 36704ECD1A529AEE00F49044 /* MLPresentController.app */; 191 | productType = "com.apple.product-type.application"; 192 | }; 193 | 36704EE51A529AEE00F49044 /* MLPresentControllerTests */ = { 194 | isa = PBXNativeTarget; 195 | buildConfigurationList = 36704EF31A529AEE00F49044 /* Build configuration list for PBXNativeTarget "MLPresentControllerTests" */; 196 | buildPhases = ( 197 | 36704EE21A529AEE00F49044 /* Sources */, 198 | 36704EE31A529AEE00F49044 /* Frameworks */, 199 | 36704EE41A529AEE00F49044 /* Resources */, 200 | ); 201 | buildRules = ( 202 | ); 203 | dependencies = ( 204 | 36704EE81A529AEE00F49044 /* PBXTargetDependency */, 205 | ); 206 | name = MLPresentControllerTests; 207 | productName = MLPresentControllerTests; 208 | productReference = 36704EE61A529AEE00F49044 /* MLPresentControllerTests.xctest */; 209 | productType = "com.apple.product-type.bundle.unit-test"; 210 | }; 211 | /* End PBXNativeTarget section */ 212 | 213 | /* Begin PBXProject section */ 214 | 36704EC51A529AEE00F49044 /* Project object */ = { 215 | isa = PBXProject; 216 | attributes = { 217 | LastUpgradeCheck = 0610; 218 | ORGANIZATIONNAME = molon; 219 | TargetAttributes = { 220 | 36704ECC1A529AEE00F49044 = { 221 | CreatedOnToolsVersion = 6.1; 222 | }; 223 | 36704EE51A529AEE00F49044 = { 224 | CreatedOnToolsVersion = 6.1; 225 | TestTargetID = 36704ECC1A529AEE00F49044; 226 | }; 227 | }; 228 | }; 229 | buildConfigurationList = 36704EC81A529AEE00F49044 /* Build configuration list for PBXProject "MLPresentController" */; 230 | compatibilityVersion = "Xcode 3.2"; 231 | developmentRegion = English; 232 | hasScannedForEncodings = 0; 233 | knownRegions = ( 234 | en, 235 | Base, 236 | ); 237 | mainGroup = 36704EC41A529AEE00F49044; 238 | productRefGroup = 36704ECE1A529AEE00F49044 /* Products */; 239 | projectDirPath = ""; 240 | projectRoot = ""; 241 | targets = ( 242 | 36704ECC1A529AEE00F49044 /* MLPresentController */, 243 | 36704EE51A529AEE00F49044 /* MLPresentControllerTests */, 244 | ); 245 | }; 246 | /* End PBXProject section */ 247 | 248 | /* Begin PBXResourcesBuildPhase section */ 249 | 36704ECB1A529AEE00F49044 /* Resources */ = { 250 | isa = PBXResourcesBuildPhase; 251 | buildActionMask = 2147483647; 252 | files = ( 253 | 36704EE11A529AEE00F49044 /* LaunchScreen.xib in Resources */, 254 | 36704EDE1A529AEE00F49044 /* Images.xcassets in Resources */, 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | }; 258 | 36704EE41A529AEE00F49044 /* Resources */ = { 259 | isa = PBXResourcesBuildPhase; 260 | buildActionMask = 2147483647; 261 | files = ( 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | }; 265 | /* End PBXResourcesBuildPhase section */ 266 | 267 | /* Begin PBXShellScriptBuildPhase section */ 268 | 28C3600F8D3A615657755C69 /* Copy Pods Resources */ = { 269 | isa = PBXShellScriptBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | ); 273 | inputPaths = ( 274 | ); 275 | name = "Copy Pods Resources"; 276 | outputPaths = ( 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | shellPath = /bin/sh; 280 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; 281 | showEnvVarsInLog = 0; 282 | }; 283 | A347D601E9E9249F3B4E7696 /* Check Pods Manifest.lock */ = { 284 | isa = PBXShellScriptBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | ); 288 | inputPaths = ( 289 | ); 290 | name = "Check Pods Manifest.lock"; 291 | outputPaths = ( 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | shellPath = /bin/sh; 295 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 296 | showEnvVarsInLog = 0; 297 | }; 298 | /* End PBXShellScriptBuildPhase section */ 299 | 300 | /* Begin PBXSourcesBuildPhase section */ 301 | 36704EC91A529AEE00F49044 /* Sources */ = { 302 | isa = PBXSourcesBuildPhase; 303 | buildActionMask = 2147483647; 304 | files = ( 305 | 3617719F1A7B291B00D8F8B2 /* PresentedViewController2.m in Sources */, 306 | 361771A81A7B420000D8F8B2 /* UIView+Convenience.m in Sources */, 307 | 36537B4A1A529F390006DBE0 /* PresentedViewController.m in Sources */, 308 | 36704ED91A529AEE00F49044 /* ViewController.m in Sources */, 309 | 361771A21A7B30CF00D8F8B2 /* MLSlidePresentControllerAnimator.m in Sources */, 310 | 36704ED61A529AEE00F49044 /* AppDelegate.m in Sources */, 311 | 36704ED31A529AEE00F49044 /* main.m in Sources */, 312 | ); 313 | runOnlyForDeploymentPostprocessing = 0; 314 | }; 315 | 36704EE21A529AEE00F49044 /* Sources */ = { 316 | isa = PBXSourcesBuildPhase; 317 | buildActionMask = 2147483647; 318 | files = ( 319 | 36704EED1A529AEE00F49044 /* MLPresentControllerTests.m in Sources */, 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | }; 323 | /* End PBXSourcesBuildPhase section */ 324 | 325 | /* Begin PBXTargetDependency section */ 326 | 36704EE81A529AEE00F49044 /* PBXTargetDependency */ = { 327 | isa = PBXTargetDependency; 328 | target = 36704ECC1A529AEE00F49044 /* MLPresentController */; 329 | targetProxy = 36704EE71A529AEE00F49044 /* PBXContainerItemProxy */; 330 | }; 331 | /* End PBXTargetDependency section */ 332 | 333 | /* Begin PBXVariantGroup section */ 334 | 36704EDF1A529AEE00F49044 /* LaunchScreen.xib */ = { 335 | isa = PBXVariantGroup; 336 | children = ( 337 | 36704EE01A529AEE00F49044 /* Base */, 338 | ); 339 | name = LaunchScreen.xib; 340 | sourceTree = ""; 341 | }; 342 | /* End PBXVariantGroup section */ 343 | 344 | /* Begin XCBuildConfiguration section */ 345 | 36704EEE1A529AEE00F49044 /* Debug */ = { 346 | isa = XCBuildConfiguration; 347 | buildSettings = { 348 | ALWAYS_SEARCH_USER_PATHS = NO; 349 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 350 | CLANG_CXX_LIBRARY = "libc++"; 351 | CLANG_ENABLE_MODULES = YES; 352 | CLANG_ENABLE_OBJC_ARC = YES; 353 | CLANG_WARN_BOOL_CONVERSION = YES; 354 | CLANG_WARN_CONSTANT_CONVERSION = YES; 355 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 356 | CLANG_WARN_EMPTY_BODY = YES; 357 | CLANG_WARN_ENUM_CONVERSION = YES; 358 | CLANG_WARN_INT_CONVERSION = YES; 359 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 360 | CLANG_WARN_UNREACHABLE_CODE = YES; 361 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 362 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 363 | COPY_PHASE_STRIP = NO; 364 | ENABLE_STRICT_OBJC_MSGSEND = YES; 365 | GCC_C_LANGUAGE_STANDARD = gnu99; 366 | GCC_DYNAMIC_NO_PIC = NO; 367 | GCC_OPTIMIZATION_LEVEL = 0; 368 | GCC_PREPROCESSOR_DEFINITIONS = ( 369 | "DEBUG=1", 370 | "$(inherited)", 371 | ); 372 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 380 | MTL_ENABLE_DEBUG_INFO = YES; 381 | ONLY_ACTIVE_ARCH = YES; 382 | SDKROOT = iphoneos; 383 | TARGETED_DEVICE_FAMILY = "1,2"; 384 | }; 385 | name = Debug; 386 | }; 387 | 36704EEF1A529AEE00F49044 /* Release */ = { 388 | isa = XCBuildConfiguration; 389 | buildSettings = { 390 | ALWAYS_SEARCH_USER_PATHS = NO; 391 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 392 | CLANG_CXX_LIBRARY = "libc++"; 393 | CLANG_ENABLE_MODULES = YES; 394 | CLANG_ENABLE_OBJC_ARC = YES; 395 | CLANG_WARN_BOOL_CONVERSION = YES; 396 | CLANG_WARN_CONSTANT_CONVERSION = YES; 397 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 398 | CLANG_WARN_EMPTY_BODY = YES; 399 | CLANG_WARN_ENUM_CONVERSION = YES; 400 | CLANG_WARN_INT_CONVERSION = YES; 401 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 402 | CLANG_WARN_UNREACHABLE_CODE = YES; 403 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 405 | COPY_PHASE_STRIP = YES; 406 | ENABLE_NS_ASSERTIONS = NO; 407 | ENABLE_STRICT_OBJC_MSGSEND = YES; 408 | GCC_C_LANGUAGE_STANDARD = gnu99; 409 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 410 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 411 | GCC_WARN_UNDECLARED_SELECTOR = YES; 412 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 413 | GCC_WARN_UNUSED_FUNCTION = YES; 414 | GCC_WARN_UNUSED_VARIABLE = YES; 415 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 416 | MTL_ENABLE_DEBUG_INFO = NO; 417 | SDKROOT = iphoneos; 418 | TARGETED_DEVICE_FAMILY = "1,2"; 419 | VALIDATE_PRODUCT = YES; 420 | }; 421 | name = Release; 422 | }; 423 | 36704EF11A529AEE00F49044 /* Debug */ = { 424 | isa = XCBuildConfiguration; 425 | baseConfigurationReference = 89977BC972E8DD8C37C335CB /* Pods.debug.xcconfig */; 426 | buildSettings = { 427 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 428 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 429 | IBSC_FLATTEN_NIBS = NO; 430 | INFOPLIST_FILE = MLPresentController/Info.plist; 431 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 432 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 433 | PRODUCT_NAME = "$(TARGET_NAME)"; 434 | TARGETED_DEVICE_FAMILY = 1; 435 | }; 436 | name = Debug; 437 | }; 438 | 36704EF21A529AEE00F49044 /* Release */ = { 439 | isa = XCBuildConfiguration; 440 | baseConfigurationReference = F4601CFA969053865CB7533B /* Pods.release.xcconfig */; 441 | buildSettings = { 442 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 443 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 444 | IBSC_FLATTEN_NIBS = NO; 445 | INFOPLIST_FILE = MLPresentController/Info.plist; 446 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 447 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 448 | PRODUCT_NAME = "$(TARGET_NAME)"; 449 | TARGETED_DEVICE_FAMILY = 1; 450 | }; 451 | name = Release; 452 | }; 453 | 36704EF41A529AEE00F49044 /* Debug */ = { 454 | isa = XCBuildConfiguration; 455 | buildSettings = { 456 | BUNDLE_LOADER = "$(TEST_HOST)"; 457 | FRAMEWORK_SEARCH_PATHS = ( 458 | "$(SDKROOT)/Developer/Library/Frameworks", 459 | "$(inherited)", 460 | ); 461 | GCC_PREPROCESSOR_DEFINITIONS = ( 462 | "DEBUG=1", 463 | "$(inherited)", 464 | ); 465 | INFOPLIST_FILE = MLPresentControllerTests/Info.plist; 466 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 467 | PRODUCT_NAME = "$(TARGET_NAME)"; 468 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MLPresentController.app/MLPresentController"; 469 | }; 470 | name = Debug; 471 | }; 472 | 36704EF51A529AEE00F49044 /* Release */ = { 473 | isa = XCBuildConfiguration; 474 | buildSettings = { 475 | BUNDLE_LOADER = "$(TEST_HOST)"; 476 | FRAMEWORK_SEARCH_PATHS = ( 477 | "$(SDKROOT)/Developer/Library/Frameworks", 478 | "$(inherited)", 479 | ); 480 | INFOPLIST_FILE = MLPresentControllerTests/Info.plist; 481 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 482 | PRODUCT_NAME = "$(TARGET_NAME)"; 483 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MLPresentController.app/MLPresentController"; 484 | }; 485 | name = Release; 486 | }; 487 | /* End XCBuildConfiguration section */ 488 | 489 | /* Begin XCConfigurationList section */ 490 | 36704EC81A529AEE00F49044 /* Build configuration list for PBXProject "MLPresentController" */ = { 491 | isa = XCConfigurationList; 492 | buildConfigurations = ( 493 | 36704EEE1A529AEE00F49044 /* Debug */, 494 | 36704EEF1A529AEE00F49044 /* Release */, 495 | ); 496 | defaultConfigurationIsVisible = 0; 497 | defaultConfigurationName = Release; 498 | }; 499 | 36704EF01A529AEE00F49044 /* Build configuration list for PBXNativeTarget "MLPresentController" */ = { 500 | isa = XCConfigurationList; 501 | buildConfigurations = ( 502 | 36704EF11A529AEE00F49044 /* Debug */, 503 | 36704EF21A529AEE00F49044 /* Release */, 504 | ); 505 | defaultConfigurationIsVisible = 0; 506 | defaultConfigurationName = Release; 507 | }; 508 | 36704EF31A529AEE00F49044 /* Build configuration list for PBXNativeTarget "MLPresentControllerTests" */ = { 509 | isa = XCConfigurationList; 510 | buildConfigurations = ( 511 | 36704EF41A529AEE00F49044 /* Debug */, 512 | 36704EF51A529AEE00F49044 /* Release */, 513 | ); 514 | defaultConfigurationIsVisible = 0; 515 | defaultConfigurationName = Release; 516 | }; 517 | /* End XCConfigurationList section */ 518 | }; 519 | rootObject = 36704EC51A529AEE00F49044 /* Project object */; 520 | } 521 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | archiveVersion 6 | 1 7 | classes 8 | 9 | objectVersion 10 | 46 11 | objects 12 | 13 | 02EA239B0D46C0F4584CA64E 14 | 15 | children 16 | 17 | 77A0B8053F58DE44464115C5 18 | 075CA13F9BFF814A5C90D315 19 | 20 | isa 21 | PBXGroup 22 | name 23 | Products 24 | sourceTree 25 | <group> 26 | 27 | 03CF177375FE41667A871F50 28 | 29 | fileRef 30 | 3C37CAE27584932763CD4658 31 | isa 32 | PBXBuildFile 33 | 34 | 07482C43C0FC5E7FAE3C594F 35 | 36 | fileRef 37 | 761A74BB078AEF2C1C003325 38 | isa 39 | PBXBuildFile 40 | 41 | 075CA13F9BFF814A5C90D315 42 | 43 | explicitFileType 44 | archive.ar 45 | includeInIndex 46 | 0 47 | isa 48 | PBXFileReference 49 | path 50 | libPods-MLPresentController.a 51 | sourceTree 52 | BUILT_PRODUCTS_DIR 53 | 54 | 0CBF974B33D74434EC12EF5C 55 | 56 | includeInIndex 57 | 1 58 | isa 59 | PBXFileReference 60 | lastKnownFileType 61 | sourcecode.c.h 62 | name 63 | MLPresentController.h 64 | path 65 | Classes/MLPresentController.h 66 | sourceTree 67 | <group> 68 | 69 | 1022F25E25C73AF38A7A89DB 70 | 71 | children 72 | 73 | D2531ACFB014BD4CC218A1B8 74 | 75 | isa 76 | PBXGroup 77 | name 78 | iOS 79 | sourceTree 80 | <group> 81 | 82 | 12AC5B3CFBD5163ECCE73CFF 83 | 84 | children 85 | 86 | F1C6846B2A7F2B41E537EAD5 87 | 88 | isa 89 | PBXGroup 90 | name 91 | Targets Support Files 92 | sourceTree 93 | <group> 94 | 95 | 1BC2B110B5A35257F843F2C2 96 | 97 | attributes 98 | 99 | LastUpgradeCheck 100 | 0510 101 | 102 | buildConfigurationList 103 | 6F2D88FF4100FA6FE6ADA34E 104 | compatibilityVersion 105 | Xcode 3.2 106 | developmentRegion 107 | English 108 | hasScannedForEncodings 109 | 0 110 | isa 111 | PBXProject 112 | knownRegions 113 | 114 | en 115 | 116 | mainGroup 117 | 2ADD538C9EAD81E41148DB41 118 | productRefGroup 119 | 02EA239B0D46C0F4584CA64E 120 | projectDirPath 121 | 122 | projectReferences 123 | 124 | projectRoot 125 | 126 | targets 127 | 128 | ED4780E59732507BC23F6950 129 | D85CBCC60FB5B032BB55504C 130 | 131 | 132 | 1D60092BE06E3E7764086263 133 | 134 | fileRef 135 | 5D6126B676DF74ADBD299C34 136 | isa 137 | PBXBuildFile 138 | 139 | 248ED81D210415BDDD663A4C 140 | 141 | fileRef 142 | 5BF3548DEFE186C0B3C6DC63 143 | isa 144 | PBXBuildFile 145 | 146 | 24D38EE0AF342345F390692B 147 | 148 | includeInIndex 149 | 1 150 | isa 151 | PBXFileReference 152 | lastKnownFileType 153 | text.plist.xml 154 | path 155 | Pods-acknowledgements.plist 156 | sourceTree 157 | <group> 158 | 159 | 255F07BCFB010469C1B3E354 160 | 161 | includeInIndex 162 | 1 163 | isa 164 | PBXFileReference 165 | lastKnownFileType 166 | sourcecode.c.objc 167 | name 168 | MLPresentControllerInteractiveTransition.m 169 | path 170 | Classes/MLPresentControllerInteractiveTransition.m 171 | sourceTree 172 | <group> 173 | 174 | 27B9DCB324BBEFCC5B8B05DE 175 | 176 | fileRef 177 | 255F07BCFB010469C1B3E354 178 | isa 179 | PBXBuildFile 180 | 181 | 292E351355E02BBF5951847F 182 | 183 | buildActionMask 184 | 2147483647 185 | files 186 | 187 | FD03711A80ED8DA9DF9FBEE8 188 | 189 | isa 190 | PBXFrameworksBuildPhase 191 | runOnlyForDeploymentPostprocessing 192 | 0 193 | 194 | 2ADD538C9EAD81E41148DB41 195 | 196 | children 197 | 198 | 6D3388A95082A40AC78E6949 199 | 6D3A5105C434A2AC99153D8C 200 | A6AD5D82AF65FEB00544DF6D 201 | 02EA239B0D46C0F4584CA64E 202 | 12AC5B3CFBD5163ECCE73CFF 203 | 204 | isa 205 | PBXGroup 206 | sourceTree 207 | <group> 208 | 209 | 2C670B1F1BE29025713E976A 210 | 211 | includeInIndex 212 | 1 213 | isa 214 | PBXFileReference 215 | lastKnownFileType 216 | text.xcconfig 217 | path 218 | Pods.release.xcconfig 219 | sourceTree 220 | <group> 221 | 222 | 3231D3EA0DBC8A0D43D37603 223 | 224 | isa 225 | PBXTargetDependency 226 | name 227 | Pods-MLPresentController 228 | target 229 | D85CBCC60FB5B032BB55504C 230 | targetProxy 231 | 397A5E271EA8ED51839BA2BB 232 | 233 | 33AC360642B0E447CC089F27 234 | 235 | includeInIndex 236 | 1 237 | isa 238 | PBXFileReference 239 | lastKnownFileType 240 | text.script.sh 241 | path 242 | Pods-resources.sh 243 | sourceTree 244 | <group> 245 | 246 | 3842C0D67DC543DF6BD87EFD 247 | 248 | includeInIndex 249 | 1 250 | isa 251 | PBXFileReference 252 | lastKnownFileType 253 | sourcecode.c.objc 254 | name 255 | MLPresentControllerAnimator.m 256 | path 257 | Classes/MLPresentControllerAnimator.m 258 | sourceTree 259 | <group> 260 | 261 | 397A5E271EA8ED51839BA2BB 262 | 263 | containerPortal 264 | 1BC2B110B5A35257F843F2C2 265 | isa 266 | PBXContainerItemProxy 267 | proxyType 268 | 1 269 | remoteGlobalIDString 270 | D85CBCC60FB5B032BB55504C 271 | remoteInfo 272 | Pods-MLPresentController 273 | 274 | 3C37CAE27584932763CD4658 275 | 276 | includeInIndex 277 | 1 278 | isa 279 | PBXFileReference 280 | lastKnownFileType 281 | sourcecode.c.h 282 | name 283 | MLPresentController+PrivatePropertyAndMethod.h 284 | path 285 | Classes/MLPresentController+PrivatePropertyAndMethod.h 286 | sourceTree 287 | <group> 288 | 289 | 3C48D0AE4E35EEE993DA7E83 290 | 291 | buildActionMask 292 | 2147483647 293 | files 294 | 295 | 1D60092BE06E3E7764086263 296 | 297 | isa 298 | PBXSourcesBuildPhase 299 | runOnlyForDeploymentPostprocessing 300 | 0 301 | 302 | 3DD12646E5B0A1FE9B427EF1 303 | 304 | baseConfigurationReference 305 | D672ACE04DC5D6FF7037AAD3 306 | buildSettings 307 | 308 | ALWAYS_SEARCH_USER_PATHS 309 | NO 310 | COPY_PHASE_STRIP 311 | NO 312 | DSTROOT 313 | /tmp/xcodeproj.dst 314 | GCC_DYNAMIC_NO_PIC 315 | NO 316 | GCC_OPTIMIZATION_LEVEL 317 | 0 318 | GCC_PRECOMPILE_PREFIX_HEADER 319 | YES 320 | GCC_PREPROCESSOR_DEFINITIONS 321 | 322 | DEBUG=1 323 | $(inherited) 324 | 325 | GCC_SYMBOLS_PRIVATE_EXTERN 326 | NO 327 | INSTALL_PATH 328 | $(BUILT_PRODUCTS_DIR) 329 | IPHONEOS_DEPLOYMENT_TARGET 330 | 7.0 331 | OTHER_LDFLAGS 332 | 333 | OTHER_LIBTOOLFLAGS 334 | 335 | PRODUCT_NAME 336 | $(TARGET_NAME) 337 | PUBLIC_HEADERS_FOLDER_PATH 338 | $(TARGET_NAME) 339 | SDKROOT 340 | iphoneos 341 | SKIP_INSTALL 342 | YES 343 | 344 | isa 345 | XCBuildConfiguration 346 | name 347 | Debug 348 | 349 | 452360D179DD990CB4C6A2B0 350 | 351 | includeInIndex 352 | 1 353 | isa 354 | PBXFileReference 355 | lastKnownFileType 356 | sourcecode.c.h 357 | name 358 | MLPresentControllerInteractiveTransition.h 359 | path 360 | Classes/MLPresentControllerInteractiveTransition.h 361 | sourceTree 362 | <group> 363 | 364 | 528F4B3B6C1725ADC2D848BC 365 | 366 | includeInIndex 367 | 1 368 | isa 369 | PBXFileReference 370 | lastKnownFileType 371 | text.xcconfig 372 | path 373 | Pods-MLPresentController-Private.xcconfig 374 | sourceTree 375 | <group> 376 | 377 | 52C040D784409BE8D5766DEC 378 | 379 | baseConfigurationReference 380 | 528F4B3B6C1725ADC2D848BC 381 | buildSettings 382 | 383 | ALWAYS_SEARCH_USER_PATHS 384 | NO 385 | COPY_PHASE_STRIP 386 | YES 387 | DSTROOT 388 | /tmp/xcodeproj.dst 389 | GCC_PRECOMPILE_PREFIX_HEADER 390 | YES 391 | GCC_PREFIX_HEADER 392 | Target Support Files/Pods-MLPresentController/Pods-MLPresentController-prefix.pch 393 | INSTALL_PATH 394 | $(BUILT_PRODUCTS_DIR) 395 | IPHONEOS_DEPLOYMENT_TARGET 396 | 7.0 397 | OTHER_CFLAGS 398 | 399 | -DNS_BLOCK_ASSERTIONS=1 400 | $(inherited) 401 | 402 | OTHER_CPLUSPLUSFLAGS 403 | 404 | -DNS_BLOCK_ASSERTIONS=1 405 | $(inherited) 406 | 407 | OTHER_LDFLAGS 408 | 409 | OTHER_LIBTOOLFLAGS 410 | 411 | PRODUCT_NAME 412 | $(TARGET_NAME) 413 | PUBLIC_HEADERS_FOLDER_PATH 414 | $(TARGET_NAME) 415 | SDKROOT 416 | iphoneos 417 | SKIP_INSTALL 418 | YES 419 | VALIDATE_PRODUCT 420 | YES 421 | 422 | isa 423 | XCBuildConfiguration 424 | name 425 | Release 426 | 427 | 547ED66E76D7E1E34A7621DD 428 | 429 | includeInIndex 430 | 1 431 | isa 432 | PBXFileReference 433 | lastKnownFileType 434 | sourcecode.c.objc 435 | name 436 | MLRotatePresentControllerAnimator.m 437 | path 438 | Classes/Animator/MLRotatePresentControllerAnimator.m 439 | sourceTree 440 | <group> 441 | 442 | 55DC8FB30FEE030B6EFA3BC7 443 | 444 | fileRef 445 | D2531ACFB014BD4CC218A1B8 446 | isa 447 | PBXBuildFile 448 | 449 | 5BF3548DEFE186C0B3C6DC63 450 | 451 | includeInIndex 452 | 1 453 | isa 454 | PBXFileReference 455 | lastKnownFileType 456 | sourcecode.c.objc 457 | path 458 | Pods-MLPresentController-dummy.m 459 | sourceTree 460 | <group> 461 | 462 | 5D6126B676DF74ADBD299C34 463 | 464 | includeInIndex 465 | 1 466 | isa 467 | PBXFileReference 468 | lastKnownFileType 469 | sourcecode.c.objc 470 | path 471 | Pods-dummy.m 472 | sourceTree 473 | <group> 474 | 475 | 67594BEDB42959D416540D65 476 | 477 | includeInIndex 478 | 1 479 | isa 480 | PBXFileReference 481 | lastKnownFileType 482 | sourcecode.c.h 483 | name 484 | UIViewController+MLPresentController.h 485 | path 486 | Classes/UIViewController+MLPresentController.h 487 | sourceTree 488 | <group> 489 | 490 | 69284A84A8E23548F9835844 491 | 492 | includeInIndex 493 | 1 494 | isa 495 | PBXFileReference 496 | lastKnownFileType 497 | sourcecode.c.h 498 | path 499 | Pods-MLPresentController-prefix.pch 500 | sourceTree 501 | <group> 502 | 503 | 6A4315B69A4B39F68A31FD81 504 | 505 | fileRef 506 | BB27A59815E9101899DF0277 507 | isa 508 | PBXBuildFile 509 | 510 | 6C5520EFF7BAD9452E55DE9B 511 | 512 | fileRef 513 | CC1A6AFAD7C9E177F11901CE 514 | isa 515 | PBXBuildFile 516 | 517 | 6D3388A95082A40AC78E6949 518 | 519 | includeInIndex 520 | 1 521 | isa 522 | PBXFileReference 523 | lastKnownFileType 524 | text 525 | name 526 | Podfile 527 | path 528 | ../Podfile 529 | sourceTree 530 | SOURCE_ROOT 531 | xcLanguageSpecificationIdentifier 532 | xcode.lang.ruby 533 | 534 | 6D3A5105C434A2AC99153D8C 535 | 536 | children 537 | 538 | B6456284892699B049D2F501 539 | 540 | isa 541 | PBXGroup 542 | name 543 | Development Pods 544 | sourceTree 545 | <group> 546 | 547 | 6F2D88FF4100FA6FE6ADA34E 548 | 549 | buildConfigurations 550 | 551 | E075D74F15134726D3211468 552 | D5D529D3EEEEBB47796BC9E2 553 | 554 | defaultConfigurationIsVisible 555 | 0 556 | defaultConfigurationName 557 | Release 558 | isa 559 | XCConfigurationList 560 | 561 | 74A9E9483113BF15EC1D5A81 562 | 563 | baseConfigurationReference 564 | 528F4B3B6C1725ADC2D848BC 565 | buildSettings 566 | 567 | ALWAYS_SEARCH_USER_PATHS 568 | NO 569 | COPY_PHASE_STRIP 570 | NO 571 | DSTROOT 572 | /tmp/xcodeproj.dst 573 | GCC_DYNAMIC_NO_PIC 574 | NO 575 | GCC_OPTIMIZATION_LEVEL 576 | 0 577 | GCC_PRECOMPILE_PREFIX_HEADER 578 | YES 579 | GCC_PREFIX_HEADER 580 | Target Support Files/Pods-MLPresentController/Pods-MLPresentController-prefix.pch 581 | GCC_PREPROCESSOR_DEFINITIONS 582 | 583 | DEBUG=1 584 | $(inherited) 585 | 586 | GCC_SYMBOLS_PRIVATE_EXTERN 587 | NO 588 | INSTALL_PATH 589 | $(BUILT_PRODUCTS_DIR) 590 | IPHONEOS_DEPLOYMENT_TARGET 591 | 7.0 592 | OTHER_LDFLAGS 593 | 594 | OTHER_LIBTOOLFLAGS 595 | 596 | PRODUCT_NAME 597 | $(TARGET_NAME) 598 | PUBLIC_HEADERS_FOLDER_PATH 599 | $(TARGET_NAME) 600 | SDKROOT 601 | iphoneos 602 | SKIP_INSTALL 603 | YES 604 | 605 | isa 606 | XCBuildConfiguration 607 | name 608 | Debug 609 | 610 | 761A74BB078AEF2C1C003325 611 | 612 | includeInIndex 613 | 1 614 | isa 615 | PBXFileReference 616 | lastKnownFileType 617 | sourcecode.c.objc 618 | name 619 | MLPresentView.m 620 | path 621 | Classes/MLPresentView.m 622 | sourceTree 623 | <group> 624 | 625 | 77A0B8053F58DE44464115C5 626 | 627 | explicitFileType 628 | archive.ar 629 | includeInIndex 630 | 0 631 | isa 632 | PBXFileReference 633 | path 634 | libPods.a 635 | sourceTree 636 | BUILT_PRODUCTS_DIR 637 | 638 | 7AAADD56E5B0BAC062FC6DA9 639 | 640 | includeInIndex 641 | 1 642 | isa 643 | PBXFileReference 644 | lastKnownFileType 645 | sourcecode.c.objc 646 | name 647 | UIView+FixIOS7BugForMLPresentController.m 648 | path 649 | Classes/UIView+FixIOS7BugForMLPresentController.m 650 | sourceTree 651 | <group> 652 | 653 | 8307A7A4D177D35D901BB887 654 | 655 | baseConfigurationReference 656 | 2C670B1F1BE29025713E976A 657 | buildSettings 658 | 659 | ALWAYS_SEARCH_USER_PATHS 660 | NO 661 | COPY_PHASE_STRIP 662 | YES 663 | DSTROOT 664 | /tmp/xcodeproj.dst 665 | GCC_PRECOMPILE_PREFIX_HEADER 666 | YES 667 | INSTALL_PATH 668 | $(BUILT_PRODUCTS_DIR) 669 | IPHONEOS_DEPLOYMENT_TARGET 670 | 7.0 671 | OTHER_CFLAGS 672 | 673 | -DNS_BLOCK_ASSERTIONS=1 674 | $(inherited) 675 | 676 | OTHER_CPLUSPLUSFLAGS 677 | 678 | -DNS_BLOCK_ASSERTIONS=1 679 | $(inherited) 680 | 681 | OTHER_LDFLAGS 682 | 683 | OTHER_LIBTOOLFLAGS 684 | 685 | PRODUCT_NAME 686 | $(TARGET_NAME) 687 | PUBLIC_HEADERS_FOLDER_PATH 688 | $(TARGET_NAME) 689 | SDKROOT 690 | iphoneos 691 | SKIP_INSTALL 692 | YES 693 | VALIDATE_PRODUCT 694 | YES 695 | 696 | isa 697 | XCBuildConfiguration 698 | name 699 | Release 700 | 701 | 85DD1D8A2BA3C661017E3582 702 | 703 | fileRef 704 | 7AAADD56E5B0BAC062FC6DA9 705 | isa 706 | PBXBuildFile 707 | 708 | 89A2CF48D8D74FA85B5E3BBE 709 | 710 | fileRef 711 | CD36385A63AFB4CEEC805FDF 712 | isa 713 | PBXBuildFile 714 | 715 | 8AD1911A0BF3900C1C7D42A4 716 | 717 | children 718 | 719 | 9F1B510E12F712398506DCE0 720 | 528F4B3B6C1725ADC2D848BC 721 | 5BF3548DEFE186C0B3C6DC63 722 | 69284A84A8E23548F9835844 723 | 724 | isa 725 | PBXGroup 726 | name 727 | Support Files 728 | path 729 | Example/Pods/Target Support Files/Pods-MLPresentController 730 | sourceTree 731 | <group> 732 | 733 | 8E4E642B6C015AEE50A99FCB 734 | 735 | includeInIndex 736 | 1 737 | isa 738 | PBXFileReference 739 | lastKnownFileType 740 | sourcecode.c.h 741 | path 742 | Pods-environment.h 743 | sourceTree 744 | <group> 745 | 746 | 976A502DC1B66B422F7DF8FF 747 | 748 | fileRef 749 | E64712CFE034A94BCDFE300C 750 | isa 751 | PBXBuildFile 752 | 753 | 9F1B510E12F712398506DCE0 754 | 755 | includeInIndex 756 | 1 757 | isa 758 | PBXFileReference 759 | lastKnownFileType 760 | text.xcconfig 761 | path 762 | Pods-MLPresentController.xcconfig 763 | sourceTree 764 | <group> 765 | 766 | A6AD5D82AF65FEB00544DF6D 767 | 768 | children 769 | 770 | 1022F25E25C73AF38A7A89DB 771 | 772 | isa 773 | PBXGroup 774 | name 775 | Frameworks 776 | sourceTree 777 | <group> 778 | 779 | A7C83E6FD465A6754FEF262D 780 | 781 | buildActionMask 782 | 2147483647 783 | files 784 | 785 | 55DC8FB30FEE030B6EFA3BC7 786 | 787 | isa 788 | PBXFrameworksBuildPhase 789 | runOnlyForDeploymentPostprocessing 790 | 0 791 | 792 | A8A5F8D43E3592A5B5D24139 793 | 794 | buildActionMask 795 | 2147483647 796 | files 797 | 798 | 6A4315B69A4B39F68A31FD81 799 | DBFDCBB2866AF656F678AD55 800 | 27B9DCB324BBEFCC5B8B05DE 801 | 07482C43C0FC5E7FAE3C594F 802 | CB07489CECDCC0D38756A132 803 | 248ED81D210415BDDD663A4C 804 | 85DD1D8A2BA3C661017E3582 805 | 89A2CF48D8D74FA85B5E3BBE 806 | 807 | isa 808 | PBXSourcesBuildPhase 809 | runOnlyForDeploymentPostprocessing 810 | 0 811 | 812 | AA27A8C10A22CFA9E436B3F8 813 | 814 | buildActionMask 815 | 2147483647 816 | files 817 | 818 | 03CF177375FE41667A871F50 819 | E1FECDBD9906405E2F53ADC0 820 | E5D3FE37556D12A73367FCC2 821 | D695580AAC9F6221439DA98D 822 | FD42D2D3B788177ADB6F8E88 823 | 976A502DC1B66B422F7DF8FF 824 | 6C5520EFF7BAD9452E55DE9B 825 | F9C1CDDD19478CAF0E2D0930 826 | 827 | isa 828 | PBXHeadersBuildPhase 829 | runOnlyForDeploymentPostprocessing 830 | 0 831 | 832 | B6456284892699B049D2F501 833 | 834 | children 835 | 836 | 0CBF974B33D74434EC12EF5C 837 | BB27A59815E9101899DF0277 838 | 3C37CAE27584932763CD4658 839 | C7CF26D9ADE2EC24895169E1 840 | 3842C0D67DC543DF6BD87EFD 841 | 452360D179DD990CB4C6A2B0 842 | 255F07BCFB010469C1B3E354 843 | BB267AAF4820DED1647E1BFA 844 | 761A74BB078AEF2C1C003325 845 | E64712CFE034A94BCDFE300C 846 | 547ED66E76D7E1E34A7621DD 847 | CC1A6AFAD7C9E177F11901CE 848 | 7AAADD56E5B0BAC062FC6DA9 849 | 67594BEDB42959D416540D65 850 | CD36385A63AFB4CEEC805FDF 851 | 8AD1911A0BF3900C1C7D42A4 852 | 853 | isa 854 | PBXGroup 855 | name 856 | MLPresentController 857 | path 858 | ../.. 859 | sourceTree 860 | <group> 861 | 862 | B6FC930A7AA8E92EC93B9C00 863 | 864 | includeInIndex 865 | 1 866 | isa 867 | PBXFileReference 868 | lastKnownFileType 869 | text 870 | path 871 | Pods-acknowledgements.markdown 872 | sourceTree 873 | <group> 874 | 875 | BB267AAF4820DED1647E1BFA 876 | 877 | includeInIndex 878 | 1 879 | isa 880 | PBXFileReference 881 | lastKnownFileType 882 | sourcecode.c.h 883 | name 884 | MLPresentView.h 885 | path 886 | Classes/MLPresentView.h 887 | sourceTree 888 | <group> 889 | 890 | BB27A59815E9101899DF0277 891 | 892 | includeInIndex 893 | 1 894 | isa 895 | PBXFileReference 896 | lastKnownFileType 897 | sourcecode.c.objc 898 | name 899 | MLPresentController.m 900 | path 901 | Classes/MLPresentController.m 902 | sourceTree 903 | <group> 904 | 905 | C7CF26D9ADE2EC24895169E1 906 | 907 | includeInIndex 908 | 1 909 | isa 910 | PBXFileReference 911 | lastKnownFileType 912 | sourcecode.c.h 913 | name 914 | MLPresentControllerAnimator.h 915 | path 916 | Classes/MLPresentControllerAnimator.h 917 | sourceTree 918 | <group> 919 | 920 | CB07489CECDCC0D38756A132 921 | 922 | fileRef 923 | 547ED66E76D7E1E34A7621DD 924 | isa 925 | PBXBuildFile 926 | 927 | CC1A6AFAD7C9E177F11901CE 928 | 929 | includeInIndex 930 | 1 931 | isa 932 | PBXFileReference 933 | lastKnownFileType 934 | sourcecode.c.h 935 | name 936 | UIView+FixIOS7BugForMLPresentController.h 937 | path 938 | Classes/UIView+FixIOS7BugForMLPresentController.h 939 | sourceTree 940 | <group> 941 | 942 | CD36385A63AFB4CEEC805FDF 943 | 944 | includeInIndex 945 | 1 946 | isa 947 | PBXFileReference 948 | lastKnownFileType 949 | sourcecode.c.objc 950 | name 951 | UIViewController+MLPresentController.m 952 | path 953 | Classes/UIViewController+MLPresentController.m 954 | sourceTree 955 | <group> 956 | 957 | D2531ACFB014BD4CC218A1B8 958 | 959 | isa 960 | PBXFileReference 961 | lastKnownFileType 962 | wrapper.framework 963 | name 964 | Foundation.framework 965 | path 966 | Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework 967 | sourceTree 968 | DEVELOPER_DIR 969 | 970 | D46E00CFB42EBF235DE0B9DA 971 | 972 | buildConfigurations 973 | 974 | 3DD12646E5B0A1FE9B427EF1 975 | 8307A7A4D177D35D901BB887 976 | 977 | defaultConfigurationIsVisible 978 | 0 979 | defaultConfigurationName 980 | Release 981 | isa 982 | XCConfigurationList 983 | 984 | D5D529D3EEEEBB47796BC9E2 985 | 986 | buildSettings 987 | 988 | ALWAYS_SEARCH_USER_PATHS 989 | NO 990 | CLANG_CXX_LANGUAGE_STANDARD 991 | gnu++0x 992 | CLANG_CXX_LIBRARY 993 | libc++ 994 | CLANG_ENABLE_MODULES 995 | YES 996 | CLANG_ENABLE_OBJC_ARC 997 | YES 998 | CLANG_WARN_BOOL_CONVERSION 999 | YES 1000 | CLANG_WARN_CONSTANT_CONVERSION 1001 | YES 1002 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 1003 | YES 1004 | CLANG_WARN_EMPTY_BODY 1005 | YES 1006 | CLANG_WARN_ENUM_CONVERSION 1007 | YES 1008 | CLANG_WARN_INT_CONVERSION 1009 | YES 1010 | CLANG_WARN_OBJC_ROOT_CLASS 1011 | YES 1012 | COPY_PHASE_STRIP 1013 | NO 1014 | ENABLE_NS_ASSERTIONS 1015 | NO 1016 | GCC_C_LANGUAGE_STANDARD 1017 | gnu99 1018 | GCC_PREPROCESSOR_DEFINITIONS 1019 | 1020 | RELEASE=1 1021 | 1022 | GCC_WARN_64_TO_32_BIT_CONVERSION 1023 | YES 1024 | GCC_WARN_ABOUT_RETURN_TYPE 1025 | YES 1026 | GCC_WARN_UNDECLARED_SELECTOR 1027 | YES 1028 | GCC_WARN_UNINITIALIZED_AUTOS 1029 | YES 1030 | GCC_WARN_UNUSED_FUNCTION 1031 | YES 1032 | GCC_WARN_UNUSED_VARIABLE 1033 | YES 1034 | IPHONEOS_DEPLOYMENT_TARGET 1035 | 7.0 1036 | STRIP_INSTALLED_PRODUCT 1037 | NO 1038 | VALIDATE_PRODUCT 1039 | YES 1040 | 1041 | isa 1042 | XCBuildConfiguration 1043 | name 1044 | Release 1045 | 1046 | D672ACE04DC5D6FF7037AAD3 1047 | 1048 | includeInIndex 1049 | 1 1050 | isa 1051 | PBXFileReference 1052 | lastKnownFileType 1053 | text.xcconfig 1054 | path 1055 | Pods.debug.xcconfig 1056 | sourceTree 1057 | <group> 1058 | 1059 | D695580AAC9F6221439DA98D 1060 | 1061 | fileRef 1062 | 452360D179DD990CB4C6A2B0 1063 | isa 1064 | PBXBuildFile 1065 | 1066 | D85CBCC60FB5B032BB55504C 1067 | 1068 | buildConfigurationList 1069 | D8A83A5BCEE54C7C69817E36 1070 | buildPhases 1071 | 1072 | A8A5F8D43E3592A5B5D24139 1073 | 292E351355E02BBF5951847F 1074 | AA27A8C10A22CFA9E436B3F8 1075 | 1076 | buildRules 1077 | 1078 | dependencies 1079 | 1080 | isa 1081 | PBXNativeTarget 1082 | name 1083 | Pods-MLPresentController 1084 | productName 1085 | Pods-MLPresentController 1086 | productReference 1087 | 075CA13F9BFF814A5C90D315 1088 | productType 1089 | com.apple.product-type.library.static 1090 | 1091 | D8A83A5BCEE54C7C69817E36 1092 | 1093 | buildConfigurations 1094 | 1095 | 74A9E9483113BF15EC1D5A81 1096 | 52C040D784409BE8D5766DEC 1097 | 1098 | defaultConfigurationIsVisible 1099 | 0 1100 | defaultConfigurationName 1101 | Release 1102 | isa 1103 | XCConfigurationList 1104 | 1105 | DBFDCBB2866AF656F678AD55 1106 | 1107 | fileRef 1108 | 3842C0D67DC543DF6BD87EFD 1109 | isa 1110 | PBXBuildFile 1111 | 1112 | E075D74F15134726D3211468 1113 | 1114 | buildSettings 1115 | 1116 | ALWAYS_SEARCH_USER_PATHS 1117 | NO 1118 | CLANG_CXX_LANGUAGE_STANDARD 1119 | gnu++0x 1120 | CLANG_CXX_LIBRARY 1121 | libc++ 1122 | CLANG_ENABLE_MODULES 1123 | YES 1124 | CLANG_ENABLE_OBJC_ARC 1125 | YES 1126 | CLANG_WARN_BOOL_CONVERSION 1127 | YES 1128 | CLANG_WARN_CONSTANT_CONVERSION 1129 | YES 1130 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 1131 | YES 1132 | CLANG_WARN_EMPTY_BODY 1133 | YES 1134 | CLANG_WARN_ENUM_CONVERSION 1135 | YES 1136 | CLANG_WARN_INT_CONVERSION 1137 | YES 1138 | CLANG_WARN_OBJC_ROOT_CLASS 1139 | YES 1140 | COPY_PHASE_STRIP 1141 | YES 1142 | GCC_C_LANGUAGE_STANDARD 1143 | gnu99 1144 | GCC_DYNAMIC_NO_PIC 1145 | NO 1146 | GCC_OPTIMIZATION_LEVEL 1147 | 0 1148 | GCC_PREPROCESSOR_DEFINITIONS 1149 | 1150 | DEBUG=1 1151 | $(inherited) 1152 | 1153 | GCC_SYMBOLS_PRIVATE_EXTERN 1154 | NO 1155 | GCC_WARN_64_TO_32_BIT_CONVERSION 1156 | YES 1157 | GCC_WARN_ABOUT_RETURN_TYPE 1158 | YES 1159 | GCC_WARN_UNDECLARED_SELECTOR 1160 | YES 1161 | GCC_WARN_UNINITIALIZED_AUTOS 1162 | YES 1163 | GCC_WARN_UNUSED_FUNCTION 1164 | YES 1165 | GCC_WARN_UNUSED_VARIABLE 1166 | YES 1167 | IPHONEOS_DEPLOYMENT_TARGET 1168 | 7.0 1169 | ONLY_ACTIVE_ARCH 1170 | YES 1171 | STRIP_INSTALLED_PRODUCT 1172 | NO 1173 | 1174 | isa 1175 | XCBuildConfiguration 1176 | name 1177 | Debug 1178 | 1179 | E1FECDBD9906405E2F53ADC0 1180 | 1181 | fileRef 1182 | 0CBF974B33D74434EC12EF5C 1183 | isa 1184 | PBXBuildFile 1185 | 1186 | E5D3FE37556D12A73367FCC2 1187 | 1188 | fileRef 1189 | C7CF26D9ADE2EC24895169E1 1190 | isa 1191 | PBXBuildFile 1192 | 1193 | E64712CFE034A94BCDFE300C 1194 | 1195 | includeInIndex 1196 | 1 1197 | isa 1198 | PBXFileReference 1199 | lastKnownFileType 1200 | sourcecode.c.h 1201 | name 1202 | MLRotatePresentControllerAnimator.h 1203 | path 1204 | Classes/Animator/MLRotatePresentControllerAnimator.h 1205 | sourceTree 1206 | <group> 1207 | 1208 | ED4780E59732507BC23F6950 1209 | 1210 | buildConfigurationList 1211 | D46E00CFB42EBF235DE0B9DA 1212 | buildPhases 1213 | 1214 | 3C48D0AE4E35EEE993DA7E83 1215 | A7C83E6FD465A6754FEF262D 1216 | 1217 | buildRules 1218 | 1219 | dependencies 1220 | 1221 | 3231D3EA0DBC8A0D43D37603 1222 | 1223 | isa 1224 | PBXNativeTarget 1225 | name 1226 | Pods 1227 | productName 1228 | Pods 1229 | productReference 1230 | 77A0B8053F58DE44464115C5 1231 | productType 1232 | com.apple.product-type.library.static 1233 | 1234 | F1C6846B2A7F2B41E537EAD5 1235 | 1236 | children 1237 | 1238 | B6FC930A7AA8E92EC93B9C00 1239 | 24D38EE0AF342345F390692B 1240 | 5D6126B676DF74ADBD299C34 1241 | 8E4E642B6C015AEE50A99FCB 1242 | 33AC360642B0E447CC089F27 1243 | D672ACE04DC5D6FF7037AAD3 1244 | 2C670B1F1BE29025713E976A 1245 | 1246 | isa 1247 | PBXGroup 1248 | name 1249 | Pods 1250 | path 1251 | Target Support Files/Pods 1252 | sourceTree 1253 | <group> 1254 | 1255 | F9C1CDDD19478CAF0E2D0930 1256 | 1257 | fileRef 1258 | 67594BEDB42959D416540D65 1259 | isa 1260 | PBXBuildFile 1261 | 1262 | FD03711A80ED8DA9DF9FBEE8 1263 | 1264 | fileRef 1265 | D2531ACFB014BD4CC218A1B8 1266 | isa 1267 | PBXBuildFile 1268 | 1269 | FD42D2D3B788177ADB6F8E88 1270 | 1271 | fileRef 1272 | BB267AAF4820DED1647E1BFA 1273 | isa 1274 | PBXBuildFile 1275 | 1276 | 1277 | rootObject 1278 | 1BC2B110B5A35257F843F2C2 1279 | 1280 | 1281 | --------------------------------------------------------------------------------