自定义了TabBarController 之后必须实现以下方法才能避免报错 -(void)viewWillAppear:(BOOL)animated { [self.selectedViewController beginAppearanceTransition: YES animated: animated]; } -(void) viewDidAppear:(BOOL)animated { [self.selectedViewController endAppearanceTransition]; } -(void) viewWillDisappear:(BOOL)animated { [self.selectedViewController beginAppearanceTransition: NO animated: animated]; } -(void) viewDidDisappear:(BOOL)animated { [self.selectedViewController endAppearanceTransition]; }