标签:
iOS中的控制器有三种创建方式:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Apply" bundle:nil]; SchemeViewController *schemeVC = [storyboard instantiateViewControllerWithIdentifier:@"SchemeViewController"];
YFViewController *mj = [[YFViewController alloc] initWithNibName:@"YFViewController" bundle:nil];
YFViewController *mj = [[YFViewController alloc] init];
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated;
//将栈顶的控制器移除 - (UIViewController *)popViewControllerAnimated:(BOOL)animated; //回到指定的子控制器 - (NSArray *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated; //回到根控制器(栈底控制器) - (NSArray *)popToRootViewControllerAnimated:(BOOL)animated;
//左上角的返回按钮 @property(nonatomic,retain) UIBarButtonItem *backBarButtonItem; //中间的标题视图 @property(nonatomic,retain) UIView *titleView; //中间的标题文字 @property(nonatomic,copy) NSString *title; //左上角的视图 @property(nonatomic,retain) UIBarButtonItem *leftBarButtonItem; UIBarButtonItem *rightBarButtonItem //右上角的视图 @property(nonatomic,retain) UIBarButtonItem *rightBarButtonItem;
标签:
原文地址:http://www.cnblogs.com/yif1991/p/5143094.html