UITabBarController *tabbarController = self.tabBarController;
dispatch_async(dispatch_get_main_queue(), ^{
//選取tabbar第三個controller:Family
[tabbarController setSelectedIndex:2];
UINavigationController *navController = (UINavigationController *)tabbarController.selectedViewController;
//如果已經被push到下一頁的,都拉回到首頁
[navController popToRootViewControllerAnimated:NO];
for (UIViewController *subViewController in navController.viewControllers) {
if( [subViewController isKindOfClass:[SFFamilyViewController class]] )
{
SFFamilyViewController *familyVC = (SFFamilyViewController *)subViewController;
[familyVC performSegueWithIdentifier:@"familyeditpet" sender:nil];
}
}
});
沒有留言:
張貼留言