摘要:1在Info.plist中设置UIViewControllerBasedStatusBarAppearance 为NO2 在需要改变状态栏颜色的ViewController中在ViewDidLoad方法中增加:[ [UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];如果需要在全部View中都变色,可以写在父类的相关方法中。
阅读全文
随笔分类 - 小贴士
摘要:1在Info.plist中设置UIViewControllerBasedStatusBarAppearance 为NO2 在需要改变状态栏颜色的ViewController中在ViewDidLoad方法中增加:[ [UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];如果需要在全部View中都变色,可以写在父类的相关方法中。
阅读全文
摘要: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
阅读全文
|