13.ios之控制器管理2
什么是Segue
Segue的属性
@property (nonatomic,readonly) NSString*identifier;
@property (nonatomic,readonly) idsourceViewController;
@property (nonatomic,readonly) iddestinationViewController;
Segue的类型
自动型Segue
performSegueWithIdentifier:sender:
[self performSegueWithIdentifier:@“login2contacts”sender:nil];
// 这个self是来源控制器
performSegueWithIdentifier:sender:
- (void)prepareForSegue:(UIStoryboardSegue*)segue sender:(id)sender;
// 这个sender是当初performSegueWithIdentifier:sender:中传入的sender
Sender参数的传递
[self performSegueWithIdentifier:@“login2contacts”sender:@“jack”];
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender;
UITabBarController
UITabBarController的简单使用
- (void)addChildViewController:(UIViewController *)childController;
@property(nonatomic,copy)NSArray*viewControllers;
App主流UI框架结构
Modal
- (void)presentViewController:(UIViewController*)viewControllerToPresent animated: (BOOL)flagcompletion:(void (^)(void))completion
- (void)dismissViewControllerAnimated:(BOOL)flagcompletion: (void (^)(void))completion;
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。