0
@try {
NSArray *viewContrlls=[[self navigationController] viewControllers];
NSUInteger totalelement = [viewContrlls count];
UIViewController *LastElementController = [viewContrlls objectAtIndex:totalelement-2];
[self GotoDifferentViewWithAnimation:LastElementController];
} @catch (NSException * e) {
NSLog(@"Exception: %@", e);
}
我想使用上面的代碼得到最後訪問的viewcontroller和回滾那裏的動畫。它顯示最近訪問過的視圖 - 控制正常狀,回推insto的popto顯示錯誤
LastElementController --- <RRLoginViewController: 0x10b324e60>
但要complietime犯錯,
Pushing the same view controller instance more than once is not supported (<RRLoginViewController: 0x10b324e60>)
任何幫助.....
是[self.navigationController popViewControllerAnimated:YES]爲你工作? – 2014-08-29 10:10:03
雅,這是工作正常.. – sbrsantanu 2014-08-29 10:10:43