我正在使用UITabBarcontroller
,我希望在UISegmentController
之间切换视图,但点击UITabBarItem
时不应隐藏UISegmentController
:
if([sender selectedSegmentIndex] == 0)
{
// UIStoryboard *mystoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
// UITabBarController *wc = [mystoryboard instantiateViewControllerWithIdentifier:@""];
// [self.navigationController pushViewController:wc animated:YES];
}
else if([sender selectedSegmentIndex] == 1)
{
UIStoryboard *mystoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UITabBarController *wc = [mystoryboard instantiateViewControllerWithIdentifier:@"ProfileViewController"];
[self.navigationController pushViewController:wc animated:YES];
}