点击按钮,从页面A跳转到页面B。
- (IBAction)loginButton:(id)sender {
UIViewController *bview =[[UIViewController alloc] init];
[self presentModalViewController : bview animated:YES];
}出现了黑屏,这个是什么情况,哪里出错了,还是就是如何使用navgationbar 的push 详细点的,感谢。
- (IBAction)loginButton:(id)sender {
UIViewController *bview =[[UIViewController alloc] init];
[self presentModalViewController : bview animated:YES];
}出现了黑屏,这个是什么情况,哪里出错了,还是就是如何使用navgationbar 的push 详细点的,感谢。
[self presentModalViewController : bview animated:YES];
要进行内存释放,你这些当然奔溃了哦,bview加上autorelease
那么 UIViewController *bview =[[UIViewController alloc] init];
bview在函数结束后就释放了,所以你需要在.h中声明,这样bview的生命周期就跟随调用对象的生命周期
UIViewController *appStartController = [[UIViewController alloc] init];
self.window.rootViewController = appStartController;
◆如果不在虚拟机下运行什么iOS,就是在裸机上(或者多系统)安装iOS该如何实现?
◆在Windows下通过VMWare安装的话,不能解决的问题,帮忙看看啊
声明。。声明就是在.h文件里写 UIViewController bview;
UIViewController *anotherView;
}
UIViewController *view = [[NSClassFromString(viewcontroller) alloc]initWithNibName:viewController budle:nil];
- (IBAction)loginButton:(id)sender {
UIViewController *bview =[[UIViewController alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController : bview animated:YES];
[bview release];
}从a面推到b视图
- (IBAction)loginButton:(id)sender {
UIViewController *bview =[[UIViewController alloc] initWithNibName:nil bundle:nil];
[self.navigationController bview animated:YES];
[bview release];
}前提是保证b视图上存在子视图
self.view.window.rootViewController = vc;
[vc release];//导航push
[self.navigationController pushViewController:vc animated:YES];
[vc releas];//模态淡出
[self presentViewController:vc animated:YES completion:nil];
[vc release];