标签:页面常见问题
在跳转后的页面添加背景色:[self.view setBackgroundColor:[UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1]];
- (id)init {
self = [super init];
if (self) {
if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
[self setEdgesForExtendedLayout:UIRectEdgeNone];
}
if ([self respondsToSelector:@selector(setExtendedLayoutIncludesOpaqueBars:)]) {
[self setExtendedLayoutIncludesOpaqueBars:NO];
}
if ([self respondsToSelector:@selector(setModalPresentationCapturesStatusBarAppearance:)]) {
[self setModalPresentationCapturesStatusBarAppearance:NO];
}
[self.view setBackgroundColor:RGBCOLOR(255, 255, 255)];
}
return self;
}
进入:[self.navigationController pushViewController myVC animated:ture;
返回:[self.navigationController popViewControllerAnimated:YES];
进入:[self presentModalViewController myVC animated:YES];
返回:[self dismissModalViewControllerAnimated:YES];
self.window =[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
ViewController *viewController = [[ViewController alloc] init];
navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
self.window.rootViewController = navigationController;
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
标签:页面常见问题
原文地址:http://blog.csdn.net/huanghaiyan_123/article/details/46390073