我在不同ViewController
s之间转换视图之间存在问题。在2个不同视图控制器中的2个视图之间切换
这里的情况是:
我的应用程序与IB做了TabBarApplication其中包含每个标签有UIViewController
。第一个选项卡的UIViewController
(PlayerTabViewController)包含另一个UIViewController
(PlayerCreationViewController)来管理将作为子视图添加的视图。
我能够添加使用
[self.view addSubview:playerCreationViewController.view];
在PlayerTabViewController子视图。
问题是,从子视图我必须返回到父视图并重新加载它,因为它包含必须刷新的表视图。
在PlayerCreationViewController中使用[self.view removeFromSuperview];
我可以切换回父视图,但我无法重新加载tableview或执行其他操作。 我试图在PlayerTabViewController中实现-(void)willRemoveSubview:(UIView *)subview
方法,但它似乎从未调用函数。
你有什么想法我做错了吗?