新建TestController界面,然后在别的界面中添加下面代码,跳转到TestController界面,
代码如下:
//打开新窗口,关闭当前窗口 TestController *testController = [[TestController alloc] initWithNibName:@"TestController"bundle:nil]; [self.view.superview addSubview:testController.view]; [self.view removeFromSuperview]; //removeFromSuperview释放窗口,不用再写release,会自动管理的 [testController release];