我使用pod安装了第三方库,它有自己的navigationController。我现有的项目我在app delegate中设置了rootViewController。我是pushViewController到库ViewController(它在它自己的导航堆栈中)。当我退出然后第二次推送到库时,ViewAlready似乎就在那里,然后在顶部转换相同的视图。 在我的appDelegate中......
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
appbarViewController = [[AppBarViewController alloc] init];
[self loadNormalFlow];
[self.window makeKeyAndVisible];
}
- (void)loadNormalFlow
{
self.navigation = [[UINavigationController alloc]initWithRootViewController:appbarViewController];
self.window.rootViewController = self.navigation;
[self.navigation setNavigationBarHidden:YES];
}
-(void)displayLibraryView
{
ACSViewController *acs = [[ACSViewController alloc] init];
[self.navigation pushViewController:acs animated:nil];
}
在库ViewController类中返回原来的rootViewController我正在使用
[[UIApplication sharedApplication].delegate performSelector:@selector(loadNormalFlow)];
我好像没有正确地解雇库ViewController,或者它推了两次?任何的想法?