[[NSUserDefaults standardUserDefaults]removeObjectForKey:@"autologin"];
KTloginViewController *vc = [[KTloginViewController alloc] init];
// UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];
[self presentViewController:nav (换成vc)animated:YES completion:nil];
不更改注释是正确的,但是如果更改了,注销之后的导航栏就会消失
iOS开发19:Navigation Bar的简单设置 举例说明:::http://blog.csdn.net/hufengvip/article/details/7643532
设置UILabel的背景色为透明
Objc代码
- UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(412, 350, 200, 30)];
- label.text = NSLocalizedString(@"bootstrap_progress_label", @"");
- label.textAlignment = NSTextAlignmentCenter;
- label.textColor = [UIColor whiteColor];
在IOS7上显示正常,但是在IOS6上显示为一个白色的色块,看不到文字。解决办法是将此Label的背景色设置为透明,即增加下面代码:
- label.backgroundColor = [UIColor clearColor];
IOS7上不需要
navigationController:http://blog.csdn.net/totogo2010/article/details/7681879