首页 > 其他分享 >iphone View之间跳转

iphone View之间跳转

时间:2023-02-06 17:32:34浏览次数:41  
标签:removeFromSuperview 界面 testController TestController iphone 跳转 view View


新建TestController界面,然后在别的界面中添加下面代码,跳转到TestController界面,
代码如下:

//打开新窗口,关闭当前窗口
TestController *testController = [[TestController alloc] initWithNibName:@"TestController"bundle:nil];
[self.view.superview addSubview:testController.view];
[self.view removeFromSuperview]; //removeFromSuperview释放窗口,不用再写release,会自动管理的
[testController release];

标签:removeFromSuperview,界面,testController,TestController,iphone,跳转,view,View
From: https://blog.51cto.com/u_15955464/6039987

相关文章