标签:
-(BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController { if (viewController == self.viewControllers[3]) { picker = [[UIImagePickerController alloc]init]; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; [self presentViewController:picker animated:YES completion:nil]; return NO; } return YES; }
以上代码是判断选中的哪个item的方法,可以进行定制他们的动作。需要遵守UITabBarControllerDelegate
标签:
原文地址:http://www.cnblogs.com/huoxingdeguoguo/p/4679519.html