├── .gitignore ├── ATNavigationController.podspec ├── ATNavigationController ├── ATNavigationController.h └── ATNavigationController.m ├── ATNavigationControllerDemo ├── ATNavigationController.gif ├── ATNavigationControllerDemo.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── ATNavigationControllerDemo.xccheckout │ └── xcuserdata │ │ └── xiao6.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── ATNavigationControllerDemo.xcscheme │ │ └── xcschememanagement.plist ├── ATNavigationControllerDemo │ ├── .gitignore │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Class │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── RandomColorViewController.h │ │ ├── RandomColorViewController.m │ │ └── RandomColorViewController.xib │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── main.m └── ATNavigationControllerDemoTests │ ├── ATNavigationControllerDemoTests.m │ └── Info.plist ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Xcode 4 | build/* 5 | *.pbxuser 6 | !default.pbxuser 7 | *.mode1v3 8 | !default.mode1v3 9 | *.mode2v3 10 | !default.mode2v3 11 | *.perspectivev3 12 | !default.perspectivev3 13 | *.xcworkspace 14 | !default.xcworkspace 15 | *.xcuserdatad 16 | xcuserdata 17 | profile 18 | *.moved-aside 19 | *.xcuserstate 20 | *.swo 21 | *.swp 22 | DerivedData 23 | *.hmap 24 | *.ipa 25 | *.xcbkptlist 26 | 27 | *.xcuserstate 28 | 29 | ATNavigationControllerDemo/ATNavigationControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/xiao6.xcuserdatad/UserInterfaceState.xcuserstate 30 | 31 | ATNavigationControllerDemo/ATNavigationControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/xiao6.xcuserdatad/UserInterfaceState.xcuserstate 32 | -------------------------------------------------------------------------------- /ATNavigationController.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "ATNavigationController" 3 | s.version = "0.0.11" 4 | s.summary = "drag back to preViewController" 5 | s.homepage = "https://github.com/CoderLT/ATNavigationController" 6 | s.license = "MIT" 7 | s.author = { "AT" => "290907999@qq.com" } 8 | s.social_media_url = "http://weibo.com/aoranxmu" 9 | s.source = { :git => "https://github.com/CoderLT/ATNavigationController.git", :tag => "0.0.11" } 10 | s.source_files = "ATNavigationController" 11 | s.requires_arc = true 12 | s.platform = :ios, '6.0' 13 | s.frameworks = 'UIKit' 14 | end 15 | -------------------------------------------------------------------------------- /ATNavigationController/ATNavigationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ATNavigationController.h 3 | // YAMI 4 | // 5 | // Created by 林涛 on 15/1/24. 6 | // Copyright (c) 2015年 Summer. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | #define ATKeyWindow [[UIApplication sharedApplication] keyWindow] 13 | #define ATNavViewW [UIScreen mainScreen].bounds.size.width 14 | 15 | #define ATAnimationDuration 0.5f 16 | #define ATMinX (0.3f * ATNavViewW) 17 | 18 | @interface ATNavigationController : UINavigationController 19 | /** 20 | * If yes, disable the drag back, default no. 21 | */ 22 | @property (nonatomic, assign) BOOL disableDragBack; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ATNavigationController/ATNavigationController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ATNavigationController.m 3 | // AT 4 | // 5 | // Created by CoderAT on 15/1/24. 6 | // Copyright (c) 2015年 AT. All rights reserved. 7 | // 8 | 9 | #import "ATNavigationController.h" 10 | 11 | #define enableDrag (self.viewControllers.count > 1 && !self.disableDragBack) 12 | 13 | typedef NS_ENUM(int, ATNavMovingStateEnumes) { 14 | ATNavMovingStateStanby = 0, 15 | ATNavMovingStateDragBegan, 16 | ATNavMovingStateDragChanged, 17 | ATNavMovingStateDragEnd, 18 | ATNavMovingStateDecelerating, 19 | }; 20 | @interface ATNavigationController () 21 | /** 22 | * 黑色的蒙版 23 | */ 24 | @property (nonatomic, strong) UIView *lastScreenBlackMask; 25 | /** 26 | * 显示上一个界面的截屏 27 | */ 28 | @property (nonatomic, strong) UIImageView *lastScreenShotView; 29 | /** 30 | * 显示上一个界面的截屏黑色背景 31 | */ 32 | @property (nonatomic,retain) UIView *backgroundView; 33 | /** 34 | * 存放截屏的字典数组 key:控制器指针字符串 value:截屏图片 35 | */ 36 | @property (nonatomic,retain) NSMutableDictionary *screenShotsDict; 37 | /** 38 | * 正在移动 39 | */ 40 | @property (nonatomic,assign) ATNavMovingStateEnumes movingState; 41 | 42 | @end 43 | 44 | @implementation ATNavigationController 45 | 46 | - (NSMutableDictionary *)screenShotsDict { 47 | if (_screenShotsDict == nil) { 48 | _screenShotsDict = [NSMutableDictionary dictionary]; 49 | } 50 | return _screenShotsDict; 51 | } 52 | - (UIView *)backgroundView { 53 | if (_backgroundView == nil) { 54 | _backgroundView = [[UIView alloc]initWithFrame:self.view.bounds]; 55 | _backgroundView.backgroundColor = [UIColor blackColor]; 56 | 57 | _lastScreenShotView = [[UIImageView alloc] initWithFrame:_backgroundView.bounds]; 58 | _lastScreenShotView.backgroundColor = [UIColor whiteColor]; 59 | [_backgroundView addSubview:_lastScreenShotView]; 60 | 61 | _lastScreenBlackMask = [[UIView alloc] initWithFrame:_backgroundView.bounds]; 62 | _lastScreenBlackMask.backgroundColor = [UIColor blackColor]; 63 | [_backgroundView addSubview:_lastScreenBlackMask]; 64 | } 65 | if (_backgroundView.superview == nil) { 66 | [self.view.superview insertSubview:_backgroundView belowSubview:self.view]; 67 | } 68 | return _backgroundView; 69 | } 70 | 71 | - (void)viewDidLoad 72 | { 73 | [super viewDidLoad]; 74 | // 为导航控制器view,添加拖拽手势 75 | UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] init]; 76 | [pan addTarget:self action:@selector(paningGestureReceive:)]; 77 | [pan setDelegate:self]; 78 | [pan delaysTouchesBegan]; 79 | [self.view addGestureRecognizer:pan]; 80 | } 81 | 82 | - (void)dealloc { 83 | self.screenShotsDict = nil; 84 | [self.backgroundView removeFromSuperview]; 85 | self.backgroundView = nil; 86 | } 87 | 88 | #pragma mark - 截屏相关方法 89 | /** 90 | * 当前导航栏界面截屏 91 | */ 92 | - (UIImage *)capture { 93 | UIView *view = self.view; 94 | if (self.tabBarController) { 95 | view = self.tabBarController.view; 96 | } 97 | UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, 0.0); 98 | [view.layer renderInContext:UIGraphicsGetCurrentContext()]; 99 | UIImage * img = UIGraphicsGetImageFromCurrentImageContext(); 100 | UIGraphicsEndImageContext(); 101 | return img; 102 | } 103 | /** 104 | * 得到OC对象的指针字符串 105 | */ 106 | - (NSString *)pointer:(id)objet { 107 | return [NSString stringWithFormat:@"%p", objet]; 108 | } 109 | /** 110 | * 获取前一个界面的截屏 111 | */ 112 | - (UIImage *)lastScreenShot { 113 | UIViewController *lastVC = [self.viewControllers objectAtIndex:self.viewControllers.count - 2]; 114 | return [self.screenShotsDict objectForKey:[self pointer:lastVC]]; 115 | } 116 | 117 | #pragma mark - 监听导航栏栈控制器改变 截屏 118 | /** 119 | * push前添加当前界面截屏 120 | */ 121 | - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated { 122 | if (self.viewControllers.count > 0) { 123 | [self.screenShotsDict setObject:[self capture] forKey:[self pointer:self.topViewController]]; 124 | } 125 | [super pushViewController:viewController animated:animated]; 126 | } 127 | /** 128 | * pop后移除当前界面截屏 129 | */ 130 | - (UIViewController *)popViewControllerAnimated:(BOOL)animated { 131 | UIViewController *popVc = [super popViewControllerAnimated:animated]; 132 | [self.screenShotsDict removeObjectForKey:[self pointer:self.topViewController]]; 133 | return popVc; 134 | } 135 | /** 136 | * 重置界面的截屏(新增了界面会缺失截屏) 137 | */ 138 | - (void)setViewControllers:(NSArray *)viewControllers animated:(BOOL)animated 139 | { 140 | if ([viewControllers containsObject:self.topViewController]) { 141 | [self.screenShotsDict setObject:[self capture] forKey:[self pointer:self.topViewController]]; 142 | } 143 | [super setViewControllers:viewControllers animated:animated]; 144 | 145 | NSMutableDictionary *newDic = [NSMutableDictionary dictionary]; 146 | for (UIViewController *vc in viewControllers) { 147 | id obj = [self.screenShotsDict objectForKey:[self pointer:vc]]; 148 | if (obj) { 149 | [newDic setObject:obj forKey:[self pointer:vc]]; 150 | } 151 | } 152 | self.screenShotsDict = newDic; 153 | } 154 | 155 | #pragma mark - 拖拽移动界面 156 | - (void)moveViewWithX:(float)x 157 | { 158 | // 设置水平位移在 [0, ATNavViewW] 之间 159 | x = MAX(MIN(x, ATNavViewW), 0); 160 | // 设置frame的x 161 | self.view.frame = (CGRect){ {x, self.view.frame.origin.y}, self.view.frame.size}; 162 | // 设置黑色蒙版的不透明度 163 | self.lastScreenBlackMask.alpha = 0.6 * (1 - (x / ATNavViewW)); 164 | // 设置上一个截屏的缩放比例 165 | CGFloat scale = x / ATNavViewW * 0.05 + 0.95; 166 | self.lastScreenShotView.transform = CGAffineTransformMakeScale(scale, scale); 167 | 168 | // 移动键盘 169 | if (([[[UIDevice currentDevice] systemVersion] floatValue] >= 9)) { 170 | [[[UIApplication sharedApplication] windows] enumerateObjectsUsingBlock:^(__kindof UIWindow * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 171 | if ([obj isKindOfClass:NSClassFromString(@"UIRemoteKeyboardWindow")]) { 172 | [(UIWindow *)obj setTransform:CGAffineTransformMakeTranslation(x, 0)]; 173 | } 174 | }]; 175 | } 176 | else { 177 | if ([[[UIApplication sharedApplication] windows] count] > 1) { 178 | [((UIWindow *)[[[UIApplication sharedApplication] windows] objectAtIndex:1]) setTransform:CGAffineTransformMakeTranslation(x, 0)]; 179 | } 180 | } 181 | } 182 | 183 | - (void)paningGestureReceive:(UIPanGestureRecognizer *)recoginzer 184 | { 185 | if (!enableDrag) return; 186 | 187 | if (UIGestureRecognizerStateBegan == recoginzer.state) { 188 | if (self.movingState == ATNavMovingStateStanby) { 189 | self.movingState = ATNavMovingStateDragBegan; 190 | self.backgroundView.hidden = NO; 191 | self.lastScreenShotView.image = [self lastScreenShot]; 192 | } 193 | }else if (recoginzer.state == UIGestureRecognizerStateEnded || recoginzer.state == UIGestureRecognizerStateCancelled){ 194 | if (self.movingState == ATNavMovingStateDragBegan || self.movingState == ATNavMovingStateDragChanged) { 195 | self.movingState = ATNavMovingStateDragEnd; 196 | [self panGestureRecognizerDidFinish:recoginzer]; 197 | } 198 | } else if (recoginzer.state == UIGestureRecognizerStateChanged) { 199 | if (self.movingState == ATNavMovingStateDragBegan || self.movingState == ATNavMovingStateDragChanged) { 200 | self.movingState = ATNavMovingStateDragChanged; 201 | [self moveViewWithX:[recoginzer translationInView:ATKeyWindow].x]; 202 | } 203 | } 204 | } 205 | 206 | - (void)panGestureRecognizerDidFinish:(UIPanGestureRecognizer *)panGestureRecognizer { 207 | #define decelerationTime (0.4) 208 | // 获取手指离开时候的速率 209 | CGFloat velocityX = [panGestureRecognizer velocityInView:ATKeyWindow].x; 210 | // 手指拖拽的距离 211 | CGFloat translationX = [panGestureRecognizer translationInView:ATKeyWindow].x; 212 | // 按照一定decelerationTime的衰减时间,计算出来的目标位置 213 | CGFloat targetX = MIN(MAX(translationX + (velocityX * decelerationTime / 2), 0), ATNavViewW); 214 | // 是否pop 215 | BOOL pop = ( targetX > ATMinX ); 216 | // 设置动画初始化速率为当前瘦子离开的速率 217 | CGFloat initialSpringVelocity = fabs(velocityX) / (pop ? ATNavViewW - translationX : translationX); 218 | 219 | self.movingState = ATNavMovingStateDecelerating; 220 | [UIView animateWithDuration:ATAnimationDuration 221 | delay:0 222 | usingSpringWithDamping:1 223 | initialSpringVelocity:initialSpringVelocity 224 | options:UIViewAnimationOptionCurveEaseOut 225 | animations:^{ 226 | [self moveViewWithX:pop ? ATNavViewW : 0]; 227 | } completion:^(BOOL finished) { 228 | self.backgroundView.hidden = YES; 229 | if ( pop ) { 230 | [self popViewControllerAnimated:NO]; 231 | } 232 | self.view.frame = (CGRect){ {0, self.view.frame.origin.y}, self.view.frame.size }; 233 | self.movingState = ATNavMovingStateStanby; 234 | 235 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)((pop ? 0.3f : 0.0f) * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 236 | // 移动键盘 237 | if (([[[UIDevice currentDevice] systemVersion] floatValue] >= 9)) { 238 | [[[UIApplication sharedApplication] windows] enumerateObjectsUsingBlock:^(__kindof UIWindow * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 239 | if ([obj isKindOfClass:NSClassFromString(@"UIRemoteKeyboardWindow")]) { 240 | [(UIWindow *)obj setTransform:CGAffineTransformIdentity]; 241 | } 242 | }]; 243 | } 244 | else { 245 | if ([[[UIApplication sharedApplication] windows] count] > 1) { 246 | [((UIWindow *)[[[UIApplication sharedApplication] windows] objectAtIndex:1]) setTransform:CGAffineTransformIdentity]; 247 | } 248 | } 249 | }); 250 | }]; 251 | } 252 | 253 | #pragma mark - 拖拽手势代理 254 | /** 255 | * 不响应的手势则传递下去 256 | */ 257 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { 258 | // 手势落点在屏幕右边1/3, 不响应手势 259 | if ([touch locationInView:nil].x >= [UIScreen mainScreen].bounds.size.width * 2 / 3) { 260 | return NO; 261 | } 262 | return enableDrag; 263 | } 264 | /** 265 | * 适配cell左滑删除 266 | */ 267 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(nonnull UIGestureRecognizer *)otherGestureRecognizer { 268 | UIPanGestureRecognizer *ges = (UIPanGestureRecognizer *)otherGestureRecognizer; 269 | // 手势不是 UIPanGestureRecognizer 270 | if (![ges isKindOfClass:[UIPanGestureRecognizer class]]) { 271 | return NO; 272 | } 273 | // 手势落点在屏幕左边1/3 274 | if ([ges locationInView:nil].x <= [UIScreen mainScreen].bounds.size.width / 3) { 275 | return NO; 276 | } 277 | // 手势是 上下滑动 278 | CGPoint offset = [ges translationInView:nil]; 279 | if (fabs(offset.x) <= fabs(offset.y)) { 280 | return NO; 281 | } 282 | // 手势是 右滑 283 | if (offset.x >= 0) { 284 | return NO; 285 | } 286 | // 应该是左滑了 287 | return YES; 288 | } 289 | 290 | @end -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationController.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leechance/ATNavigationController/f4f98fea5cf50d0e278becedf59333e210169a31/ATNavigationControllerDemo/ATNavigationController.gif -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A09B22331AB0893B00E3E4A1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A09B22321AB0893B00E3E4A1 /* main.m */; }; 11 | A09B223E1AB0893B00E3E4A1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A09B223D1AB0893B00E3E4A1 /* Images.xcassets */; }; 12 | A09B22411AB0893B00E3E4A1 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = A09B223F1AB0893B00E3E4A1 /* LaunchScreen.xib */; }; 13 | A09B224D1AB0893B00E3E4A1 /* ATNavigationControllerDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A09B224C1AB0893B00E3E4A1 /* ATNavigationControllerDemoTests.m */; }; 14 | A09B225B1AB08A3500E3E4A1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A09B22581AB08A3500E3E4A1 /* AppDelegate.m */; }; 15 | A09B22601AB08A7700E3E4A1 /* ATNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = A09B225F1AB08A7700E3E4A1 /* ATNavigationController.m */; }; 16 | A09B22641AB08F3600E3E4A1 /* RandomColorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A09B22621AB08F3600E3E4A1 /* RandomColorViewController.m */; }; 17 | A09B22651AB08F3600E3E4A1 /* RandomColorViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A09B22631AB08F3600E3E4A1 /* RandomColorViewController.xib */; }; 18 | A09B22681AB091B700E3E4A1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A09B22661AB091B700E3E4A1 /* Main.storyboard */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | A09B22471AB0893B00E3E4A1 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = A09B22251AB0893B00E3E4A1 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = A09B222C1AB0893B00E3E4A1; 27 | remoteInfo = ATNavigationControllerDemo; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | A09B222D1AB0893B00E3E4A1 /* ATNavigationControllerDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ATNavigationControllerDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | A09B22311AB0893B00E3E4A1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | A09B22321AB0893B00E3E4A1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 35 | A09B223D1AB0893B00E3E4A1 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 36 | A09B22401AB0893B00E3E4A1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 37 | A09B22461AB0893B00E3E4A1 /* ATNavigationControllerDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ATNavigationControllerDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | A09B224B1AB0893B00E3E4A1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | A09B224C1AB0893B00E3E4A1 /* ATNavigationControllerDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ATNavigationControllerDemoTests.m; sourceTree = ""; }; 40 | A09B22571AB08A3500E3E4A1 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 41 | A09B22581AB08A3500E3E4A1 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 42 | A09B225E1AB08A7700E3E4A1 /* ATNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATNavigationController.h; sourceTree = ""; }; 43 | A09B225F1AB08A7700E3E4A1 /* ATNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATNavigationController.m; sourceTree = ""; }; 44 | A09B22611AB08F3600E3E4A1 /* RandomColorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomColorViewController.h; sourceTree = ""; }; 45 | A09B22621AB08F3600E3E4A1 /* RandomColorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RandomColorViewController.m; sourceTree = ""; }; 46 | A09B22631AB08F3600E3E4A1 /* RandomColorViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RandomColorViewController.xib; sourceTree = ""; }; 47 | A09B22671AB091B700E3E4A1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 48 | /* End PBXFileReference section */ 49 | 50 | /* Begin PBXFrameworksBuildPhase section */ 51 | A09B222A1AB0893B00E3E4A1 /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | A09B22431AB0893B00E3E4A1 /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | A09B22241AB0893B00E3E4A1 = { 69 | isa = PBXGroup; 70 | children = ( 71 | A09B225D1AB08A7700E3E4A1 /* ATNavigationController */, 72 | A09B222F1AB0893B00E3E4A1 /* ATNavigationControllerDemo */, 73 | A09B22491AB0893B00E3E4A1 /* ATNavigationControllerDemoTests */, 74 | A09B222E1AB0893B00E3E4A1 /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | A09B222E1AB0893B00E3E4A1 /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | A09B222D1AB0893B00E3E4A1 /* ATNavigationControllerDemo.app */, 82 | A09B22461AB0893B00E3E4A1 /* ATNavigationControllerDemoTests.xctest */, 83 | ); 84 | name = Products; 85 | sourceTree = ""; 86 | }; 87 | A09B222F1AB0893B00E3E4A1 /* ATNavigationControllerDemo */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | A09B22561AB08A3500E3E4A1 /* Class */, 91 | A09B223D1AB0893B00E3E4A1 /* Images.xcassets */, 92 | A09B22661AB091B700E3E4A1 /* Main.storyboard */, 93 | A09B223F1AB0893B00E3E4A1 /* LaunchScreen.xib */, 94 | A09B22301AB0893B00E3E4A1 /* Supporting Files */, 95 | ); 96 | path = ATNavigationControllerDemo; 97 | sourceTree = ""; 98 | }; 99 | A09B22301AB0893B00E3E4A1 /* Supporting Files */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | A09B22311AB0893B00E3E4A1 /* Info.plist */, 103 | A09B22321AB0893B00E3E4A1 /* main.m */, 104 | ); 105 | name = "Supporting Files"; 106 | sourceTree = ""; 107 | }; 108 | A09B22491AB0893B00E3E4A1 /* ATNavigationControllerDemoTests */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | A09B224C1AB0893B00E3E4A1 /* ATNavigationControllerDemoTests.m */, 112 | A09B224A1AB0893B00E3E4A1 /* Supporting Files */, 113 | ); 114 | path = ATNavigationControllerDemoTests; 115 | sourceTree = ""; 116 | }; 117 | A09B224A1AB0893B00E3E4A1 /* Supporting Files */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | A09B224B1AB0893B00E3E4A1 /* Info.plist */, 121 | ); 122 | name = "Supporting Files"; 123 | sourceTree = ""; 124 | }; 125 | A09B22561AB08A3500E3E4A1 /* Class */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | A09B22571AB08A3500E3E4A1 /* AppDelegate.h */, 129 | A09B22581AB08A3500E3E4A1 /* AppDelegate.m */, 130 | A09B22611AB08F3600E3E4A1 /* RandomColorViewController.h */, 131 | A09B22621AB08F3600E3E4A1 /* RandomColorViewController.m */, 132 | A09B22631AB08F3600E3E4A1 /* RandomColorViewController.xib */, 133 | ); 134 | path = Class; 135 | sourceTree = ""; 136 | }; 137 | A09B225D1AB08A7700E3E4A1 /* ATNavigationController */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | A09B225E1AB08A7700E3E4A1 /* ATNavigationController.h */, 141 | A09B225F1AB08A7700E3E4A1 /* ATNavigationController.m */, 142 | ); 143 | name = ATNavigationController; 144 | path = ../ATNavigationController; 145 | sourceTree = ""; 146 | }; 147 | /* End PBXGroup section */ 148 | 149 | /* Begin PBXNativeTarget section */ 150 | A09B222C1AB0893B00E3E4A1 /* ATNavigationControllerDemo */ = { 151 | isa = PBXNativeTarget; 152 | buildConfigurationList = A09B22501AB0893B00E3E4A1 /* Build configuration list for PBXNativeTarget "ATNavigationControllerDemo" */; 153 | buildPhases = ( 154 | A09B22291AB0893B00E3E4A1 /* Sources */, 155 | A09B222A1AB0893B00E3E4A1 /* Frameworks */, 156 | A09B222B1AB0893B00E3E4A1 /* Resources */, 157 | ); 158 | buildRules = ( 159 | ); 160 | dependencies = ( 161 | ); 162 | name = ATNavigationControllerDemo; 163 | productName = ATNavigationControllerDemo; 164 | productReference = A09B222D1AB0893B00E3E4A1 /* ATNavigationControllerDemo.app */; 165 | productType = "com.apple.product-type.application"; 166 | }; 167 | A09B22451AB0893B00E3E4A1 /* ATNavigationControllerDemoTests */ = { 168 | isa = PBXNativeTarget; 169 | buildConfigurationList = A09B22531AB0893B00E3E4A1 /* Build configuration list for PBXNativeTarget "ATNavigationControllerDemoTests" */; 170 | buildPhases = ( 171 | A09B22421AB0893B00E3E4A1 /* Sources */, 172 | A09B22431AB0893B00E3E4A1 /* Frameworks */, 173 | A09B22441AB0893B00E3E4A1 /* Resources */, 174 | ); 175 | buildRules = ( 176 | ); 177 | dependencies = ( 178 | A09B22481AB0893B00E3E4A1 /* PBXTargetDependency */, 179 | ); 180 | name = ATNavigationControllerDemoTests; 181 | productName = ATNavigationControllerDemoTests; 182 | productReference = A09B22461AB0893B00E3E4A1 /* ATNavigationControllerDemoTests.xctest */; 183 | productType = "com.apple.product-type.bundle.unit-test"; 184 | }; 185 | /* End PBXNativeTarget section */ 186 | 187 | /* Begin PBXProject section */ 188 | A09B22251AB0893B00E3E4A1 /* Project object */ = { 189 | isa = PBXProject; 190 | attributes = { 191 | LastUpgradeCheck = 0620; 192 | ORGANIZATIONNAME = AT; 193 | TargetAttributes = { 194 | A09B222C1AB0893B00E3E4A1 = { 195 | CreatedOnToolsVersion = 6.2; 196 | }; 197 | A09B22451AB0893B00E3E4A1 = { 198 | CreatedOnToolsVersion = 6.2; 199 | TestTargetID = A09B222C1AB0893B00E3E4A1; 200 | }; 201 | }; 202 | }; 203 | buildConfigurationList = A09B22281AB0893B00E3E4A1 /* Build configuration list for PBXProject "ATNavigationControllerDemo" */; 204 | compatibilityVersion = "Xcode 3.2"; 205 | developmentRegion = English; 206 | hasScannedForEncodings = 0; 207 | knownRegions = ( 208 | en, 209 | Base, 210 | ); 211 | mainGroup = A09B22241AB0893B00E3E4A1; 212 | productRefGroup = A09B222E1AB0893B00E3E4A1 /* Products */; 213 | projectDirPath = ""; 214 | projectRoot = ""; 215 | targets = ( 216 | A09B222C1AB0893B00E3E4A1 /* ATNavigationControllerDemo */, 217 | A09B22451AB0893B00E3E4A1 /* ATNavigationControllerDemoTests */, 218 | ); 219 | }; 220 | /* End PBXProject section */ 221 | 222 | /* Begin PBXResourcesBuildPhase section */ 223 | A09B222B1AB0893B00E3E4A1 /* Resources */ = { 224 | isa = PBXResourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | A09B22651AB08F3600E3E4A1 /* RandomColorViewController.xib in Resources */, 228 | A09B22411AB0893B00E3E4A1 /* LaunchScreen.xib in Resources */, 229 | A09B223E1AB0893B00E3E4A1 /* Images.xcassets in Resources */, 230 | A09B22681AB091B700E3E4A1 /* Main.storyboard in Resources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | A09B22441AB0893B00E3E4A1 /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | /* End PBXResourcesBuildPhase section */ 242 | 243 | /* Begin PBXSourcesBuildPhase section */ 244 | A09B22291AB0893B00E3E4A1 /* Sources */ = { 245 | isa = PBXSourcesBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | A09B22601AB08A7700E3E4A1 /* ATNavigationController.m in Sources */, 249 | A09B22641AB08F3600E3E4A1 /* RandomColorViewController.m in Sources */, 250 | A09B225B1AB08A3500E3E4A1 /* AppDelegate.m in Sources */, 251 | A09B22331AB0893B00E3E4A1 /* main.m in Sources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | A09B22421AB0893B00E3E4A1 /* Sources */ = { 256 | isa = PBXSourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | A09B224D1AB0893B00E3E4A1 /* ATNavigationControllerDemoTests.m in Sources */, 260 | ); 261 | runOnlyForDeploymentPostprocessing = 0; 262 | }; 263 | /* End PBXSourcesBuildPhase section */ 264 | 265 | /* Begin PBXTargetDependency section */ 266 | A09B22481AB0893B00E3E4A1 /* PBXTargetDependency */ = { 267 | isa = PBXTargetDependency; 268 | target = A09B222C1AB0893B00E3E4A1 /* ATNavigationControllerDemo */; 269 | targetProxy = A09B22471AB0893B00E3E4A1 /* PBXContainerItemProxy */; 270 | }; 271 | /* End PBXTargetDependency section */ 272 | 273 | /* Begin PBXVariantGroup section */ 274 | A09B223F1AB0893B00E3E4A1 /* LaunchScreen.xib */ = { 275 | isa = PBXVariantGroup; 276 | children = ( 277 | A09B22401AB0893B00E3E4A1 /* Base */, 278 | ); 279 | name = LaunchScreen.xib; 280 | sourceTree = ""; 281 | }; 282 | A09B22661AB091B700E3E4A1 /* Main.storyboard */ = { 283 | isa = PBXVariantGroup; 284 | children = ( 285 | A09B22671AB091B700E3E4A1 /* Base */, 286 | ); 287 | name = Main.storyboard; 288 | sourceTree = ""; 289 | }; 290 | /* End PBXVariantGroup section */ 291 | 292 | /* Begin XCBuildConfiguration section */ 293 | A09B224E1AB0893B00E3E4A1 /* Debug */ = { 294 | isa = XCBuildConfiguration; 295 | buildSettings = { 296 | ALWAYS_SEARCH_USER_PATHS = NO; 297 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 298 | CLANG_CXX_LIBRARY = "libc++"; 299 | CLANG_ENABLE_MODULES = YES; 300 | CLANG_ENABLE_OBJC_ARC = YES; 301 | CLANG_WARN_BOOL_CONVERSION = YES; 302 | CLANG_WARN_CONSTANT_CONVERSION = YES; 303 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 304 | CLANG_WARN_EMPTY_BODY = YES; 305 | CLANG_WARN_ENUM_CONVERSION = YES; 306 | CLANG_WARN_INT_CONVERSION = YES; 307 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 308 | CLANG_WARN_UNREACHABLE_CODE = YES; 309 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 310 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 311 | COPY_PHASE_STRIP = NO; 312 | ENABLE_STRICT_OBJC_MSGSEND = YES; 313 | GCC_C_LANGUAGE_STANDARD = gnu99; 314 | GCC_DYNAMIC_NO_PIC = NO; 315 | GCC_OPTIMIZATION_LEVEL = 0; 316 | GCC_PREPROCESSOR_DEFINITIONS = ( 317 | "DEBUG=1", 318 | "$(inherited)", 319 | ); 320 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 321 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 322 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 323 | GCC_WARN_UNDECLARED_SELECTOR = YES; 324 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 325 | GCC_WARN_UNUSED_FUNCTION = YES; 326 | GCC_WARN_UNUSED_VARIABLE = YES; 327 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 328 | MTL_ENABLE_DEBUG_INFO = YES; 329 | ONLY_ACTIVE_ARCH = YES; 330 | SDKROOT = iphoneos; 331 | }; 332 | name = Debug; 333 | }; 334 | A09B224F1AB0893B00E3E4A1 /* Release */ = { 335 | isa = XCBuildConfiguration; 336 | buildSettings = { 337 | ALWAYS_SEARCH_USER_PATHS = NO; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_CONSTANT_CONVERSION = YES; 344 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 345 | CLANG_WARN_EMPTY_BODY = YES; 346 | CLANG_WARN_ENUM_CONVERSION = YES; 347 | CLANG_WARN_INT_CONVERSION = YES; 348 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 349 | CLANG_WARN_UNREACHABLE_CODE = YES; 350 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 351 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 352 | COPY_PHASE_STRIP = NO; 353 | ENABLE_NS_ASSERTIONS = NO; 354 | ENABLE_STRICT_OBJC_MSGSEND = YES; 355 | GCC_C_LANGUAGE_STANDARD = gnu99; 356 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 357 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 358 | GCC_WARN_UNDECLARED_SELECTOR = YES; 359 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 360 | GCC_WARN_UNUSED_FUNCTION = YES; 361 | GCC_WARN_UNUSED_VARIABLE = YES; 362 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 363 | MTL_ENABLE_DEBUG_INFO = NO; 364 | SDKROOT = iphoneos; 365 | VALIDATE_PRODUCT = YES; 366 | }; 367 | name = Release; 368 | }; 369 | A09B22511AB0893B00E3E4A1 /* Debug */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 373 | INFOPLIST_FILE = ATNavigationControllerDemo/Info.plist; 374 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 375 | PRODUCT_NAME = "$(TARGET_NAME)"; 376 | }; 377 | name = Debug; 378 | }; 379 | A09B22521AB0893B00E3E4A1 /* Release */ = { 380 | isa = XCBuildConfiguration; 381 | buildSettings = { 382 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 383 | INFOPLIST_FILE = ATNavigationControllerDemo/Info.plist; 384 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 385 | PRODUCT_NAME = "$(TARGET_NAME)"; 386 | }; 387 | name = Release; 388 | }; 389 | A09B22541AB0893B00E3E4A1 /* Debug */ = { 390 | isa = XCBuildConfiguration; 391 | buildSettings = { 392 | BUNDLE_LOADER = "$(TEST_HOST)"; 393 | FRAMEWORK_SEARCH_PATHS = ( 394 | "$(SDKROOT)/Developer/Library/Frameworks", 395 | "$(inherited)", 396 | ); 397 | GCC_PREPROCESSOR_DEFINITIONS = ( 398 | "DEBUG=1", 399 | "$(inherited)", 400 | ); 401 | INFOPLIST_FILE = ATNavigationControllerDemoTests/Info.plist; 402 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 403 | PRODUCT_NAME = "$(TARGET_NAME)"; 404 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ATNavigationControllerDemo.app/ATNavigationControllerDemo"; 405 | }; 406 | name = Debug; 407 | }; 408 | A09B22551AB0893B00E3E4A1 /* Release */ = { 409 | isa = XCBuildConfiguration; 410 | buildSettings = { 411 | BUNDLE_LOADER = "$(TEST_HOST)"; 412 | FRAMEWORK_SEARCH_PATHS = ( 413 | "$(SDKROOT)/Developer/Library/Frameworks", 414 | "$(inherited)", 415 | ); 416 | INFOPLIST_FILE = ATNavigationControllerDemoTests/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 418 | PRODUCT_NAME = "$(TARGET_NAME)"; 419 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ATNavigationControllerDemo.app/ATNavigationControllerDemo"; 420 | }; 421 | name = Release; 422 | }; 423 | /* End XCBuildConfiguration section */ 424 | 425 | /* Begin XCConfigurationList section */ 426 | A09B22281AB0893B00E3E4A1 /* Build configuration list for PBXProject "ATNavigationControllerDemo" */ = { 427 | isa = XCConfigurationList; 428 | buildConfigurations = ( 429 | A09B224E1AB0893B00E3E4A1 /* Debug */, 430 | A09B224F1AB0893B00E3E4A1 /* Release */, 431 | ); 432 | defaultConfigurationIsVisible = 0; 433 | defaultConfigurationName = Release; 434 | }; 435 | A09B22501AB0893B00E3E4A1 /* Build configuration list for PBXNativeTarget "ATNavigationControllerDemo" */ = { 436 | isa = XCConfigurationList; 437 | buildConfigurations = ( 438 | A09B22511AB0893B00E3E4A1 /* Debug */, 439 | A09B22521AB0893B00E3E4A1 /* Release */, 440 | ); 441 | defaultConfigurationIsVisible = 0; 442 | defaultConfigurationName = Release; 443 | }; 444 | A09B22531AB0893B00E3E4A1 /* Build configuration list for PBXNativeTarget "ATNavigationControllerDemoTests" */ = { 445 | isa = XCConfigurationList; 446 | buildConfigurations = ( 447 | A09B22541AB0893B00E3E4A1 /* Debug */, 448 | A09B22551AB0893B00E3E4A1 /* Release */, 449 | ); 450 | defaultConfigurationIsVisible = 0; 451 | defaultConfigurationName = Release; 452 | }; 453 | /* End XCConfigurationList section */ 454 | }; 455 | rootObject = A09B22251AB0893B00E3E4A1 /* Project object */; 456 | } 457 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo.xcodeproj/project.xcworkspace/xcshareddata/ATNavigationControllerDemo.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 2278917E-7D95-4444-AFED-91B85C299DAD 9 | IDESourceControlProjectName 10 | ATNavigationControllerDemo 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 85B09A073BE8CEA5C1E8109041FD73146B9F0372 14 | https://github.com/CoderLT/ATNavigationController.git 15 | 16 | IDESourceControlProjectPath 17 | ATNavigationControllerDemo/ATNavigationControllerDemo.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 85B09A073BE8CEA5C1E8109041FD73146B9F0372 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/CoderLT/ATNavigationController.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 85B09A073BE8CEA5C1E8109041FD73146B9F0372 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 85B09A073BE8CEA5C1E8109041FD73146B9F0372 36 | IDESourceControlWCCName 37 | ATNavigationController 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo.xcodeproj/xcuserdata/xiao6.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo.xcodeproj/xcuserdata/xiao6.xcuserdatad/xcschemes/ATNavigationControllerDemo.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 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo.xcodeproj/xcuserdata/xiao6.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ATNavigationControllerDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | A09B222C1AB0893B00E3E4A1 16 | 17 | primary 18 | 19 | 20 | A09B22451AB0893B00E3E4A1 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Xcode 4 | build/* 5 | *.pbxuser 6 | !default.pbxuser 7 | *.mode1v3 8 | !default.mode1v3 9 | *.mode2v3 10 | !default.mode2v3 11 | *.perspectivev3 12 | !default.perspectivev3 13 | *.xcworkspace 14 | !default.xcworkspace 15 | *.xcuserdatad 16 | xcuserdata 17 | profile 18 | *.moved-aside 19 | *.xcuserstate 20 | *.swo 21 | *.swp 22 | 23 | *.xcbkptlist 24 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo/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 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo/Class/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ATNavigationControllerDemo 4 | // 5 | // Created by 林涛 on 15/3/11. 6 | // Copyright (c) 2015年 AT. 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 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo/Class/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ATNavigationControllerDemo 4 | // 5 | // Created by 林涛 on 15/3/11. 6 | // Copyright (c) 2015年 AT. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // 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. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // 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. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo/Class/RandomColorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RandomColorViewController.h 3 | // ATNavigationControllerDemo 4 | // 5 | // Created by AT on 15/3/11. 6 | // Copyright (c) 2015年 AT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RandomColorViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo/Class/RandomColorViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RandomColorViewController.m 3 | // ATNavigationControllerDemo 4 | // 5 | // Created by AT on 15/3/11. 6 | // Copyright (c) 2015年 AT. All rights reserved. 7 | // 8 | 9 | #import "RandomColorViewController.h" 10 | 11 | @interface RandomColorViewController () 12 | 13 | @end 14 | 15 | @implementation RandomColorViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | // 设置view背景色 21 | self.view.backgroundColor = [UIColor colorWithRed:(arc4random()%256)/255.0f 22 | green:(arc4random()%256)/255.0f 23 | blue:(arc4random()%256)/255.0f 24 | alpha:1.0f]; 25 | } 26 | - (IBAction)push:(id)sender { 27 | // push 一个界面 28 | [self.navigationController pushViewController:[[RandomColorViewController alloc] init] animated:YES]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo/Class/RandomColorViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo/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 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | AT.$(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.0.2 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ATNavigationControllerDemo 4 | // 5 | // Created by 林涛 on 15/3/11. 6 | // Copyright (c) 2015年 AT. 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 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemoTests/ATNavigationControllerDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ATNavigationControllerDemoTests.m 3 | // ATNavigationControllerDemoTests 4 | // 5 | // Created by 林涛 on 15/3/11. 6 | // Copyright (c) 2015年 AT. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ATNavigationControllerDemoTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation ATNavigationControllerDemoTests 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 | -------------------------------------------------------------------------------- /ATNavigationControllerDemo/ATNavigationControllerDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | AT.$(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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 CoderAT (https://github.com/CoderLT/ATNavigationController) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## ATNavigationController 2 | 3 | * 导航栏控制器 向右侧滑 返回前一个ViewController的功能 4 | 5 | ![演示Gif](https://raw.githubusercontent.com/CoderLT/ATNavigationController/master/ATNavigationControllerDemo/ATNavigationController.gif) 6 | 7 | ## 怎么使用ATNavigationController 8 | 9 | * cocoapods导入:`pod 'ATNavigationController'` 10 | 11 | * 手动导入: 12 | * 将`ATNavigationController/ATNavigationController`文件夹中的所有源代码拽入项目中 13 | * 导入头文件:`#import "ATNavigationController.h"` 14 | * 将您自定义的的导航栏控制器继承自ATNavigationController 15 | 16 | ## 感谢 17 | * 基于[KKNavigationController](https://github.com/Coneboy-k/KKNavigationController)进一步改造完善 在此表示感谢~ 18 | 19 | ## 结束 20 | 21 | * 在使用过程中如果遇到任何问题,请Issues我,谢谢。 22 | --------------------------------------------------------------------------------