iOS push 问题 : Unbalanced calls to begin/end appearance transitions for xxx
自定义了TabBarController 之后必须实现以下方法,就不会出现 Unbalanced calls to begin/end appearance transitions for xxx!
- (void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [self.selectedViewController beginAppearanceTransition: YES animated: animated]; } - (void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; [self.selectedViewController endAppearanceTransition]; } - (void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:animated]; [self.selectedViewController beginAppearanceTransition: NO animated: animated]; } - (void)viewDidDisappear:(BOOL)animated{ [super viewDidDisappear:animated]; [self.selectedViewController endAppearanceTransition]; }