EnamelPot

自律在于今天和明天之间

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年12月9日

摘要: UINavigationController的结构最朴素的说,UINavigationController就是一个容器,设置它的RootViewController,即设定了第一个vc,随后push一个新vc即入栈,pop便出栈,值得注意到是pop可以到任意层的vc。1.创建一个NavigationController 并设定RootViewControllerself.window.rootViewController=[[UINavigationController alloc]initWithRootViewController:[[AViewController alloc]initW 阅读全文
posted @ 2013-12-09 16:44 EnamelPot 阅读(377) 评论(0) 推荐(0)

摘要: UITabBarController的结构1.创建一个UITabBarControllerUITabBarController通常作为rootViewController,且不能添加到别的container viewController中。最常见的创建UITabBarController的地方就是在application delegate中的applicationDidFinishLaunching:方法中。//1.创建一个UITabBarController对象(这个自建类继承子UITabBarController)RootViewController *tabView=[RootViewC 阅读全文
posted @ 2013-12-09 16:22 EnamelPot 阅读(375) 评论(0) 推荐(0)

摘要: 1.在ios5中,ViewController中新添加1个属性和5个方法@property(nonatomic,readonly) NSArray *childViewControllers- (void)addChildViewController:(UIViewController *)childController- (void) removeFromParentViewController- (void)transitionFromViewController::::::- (void)willMoveToParentViewController:(UIViewController * 阅读全文
posted @ 2013-12-09 15:50 EnamelPot 阅读(1966) 评论(0) 推荐(0)

摘要: 1.presentViewController新建2个viewcontroller a和ba弹出b 则a为presenting view controller b为presented view controller-(void)someButtonClicked { [self presentViewController:self.aVC animated:YES completion:^{ }]; } 2.Modal Presentation Styles(弹出风格)设置presented VC的modalPresentationStyle属性UIModalPresentat... 阅读全文
posted @ 2013-12-09 15:40 EnamelPot 阅读(579) 评论(0) 推荐(0)

摘要: 1在Info.plist中设置UIViewControllerBasedStatusBarAppearance 为NO2 在需要改变状态栏颜色的ViewController中在ViewDidLoad方法中增加:[ [UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];如果需要在全部View中都变色,可以写在父类的相关方法中。 阅读全文
posted @ 2013-12-09 13:51 EnamelPot 阅读(178) 评论(0) 推荐(0)

摘要: 1 //得到名为Main的storyboard的实例2 [UIStoryboard storyboardWithName:@"Main" bundle:nil];3 //得到名为aaa的VC实例 也就是说在storyboard中设置的VC其实是你已链接类的一个实例4 [storyboard instantiateViewControllerWithIdentifier:@"aaa"];5 6 //洁一些7 UIViewController *someVC = [self.storyboard instantiateViewControllerWithId 阅读全文
posted @ 2013-12-09 13:48 EnamelPot 阅读(222) 评论(0) 推荐(0)

摘要: 、 阅读全文
posted @ 2013-12-09 13:42 EnamelPot 阅读(191) 评论(0) 推荐(0)