码迷,mamicode.com
首页 > 其他好文 > 详细

UIViewController

时间:2015-05-24 00:11:00      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:

模式对话窗体跳转

1、

//模式对话窗体跳转

- (void)presentViewController:(UIViewController *)viewControllerToPresent  animated:(BOOL)flag  completion:(void (^)(void))completion;

如:

SubViewController *svc = [[SubViewController alloc]init];

    svc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

    [self presentViewController:svc animated:YES completion:^{

    }];

 

svc.modalTransitionStyle 指切换模式

 

2、

//关闭模式对话窗体

- (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion;

如:

[self dismissViewControllerAnimated:YES completion:^{

    }];

 

 

 

生命周期

1、loadView

2、viewDidLoad

//3、viewDidUnload

//4、didReceiveMemoryWarning

5、viewWillAppear

6、viewDidAppear

7、viewWillDisappear

8、viewDidDisappear

 

一般生命周期是:loadView  ->  viewDidLoad  ->  viewWillAppear  ->  viewDidAppear  ->viewWillDisappear  ->viewDidDisappear

UIViewController

标签:

原文地址:http://www.cnblogs.com/durwards/p/4525122.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!