Unbalanced calls to begin/end appearance transitions for <idoorderhomeviewcontroller:0x8da2960>.

Source: Internet
Author: User

Custom Tabbarcontroller Push the next level controller will report such an error: Unbalanced calls to begin/end appearance transitions for < Uiviewcontroller>.

Some of the answers on the web are animated by animations,The workaround is to add a variable of type bool to check whether the animation is being made.

if (transiting) {
return;
    }
transiting = YES;
[self TRANSITIONFROMVIEWCONTROLLER:_CURRENTVC toviewcontroller:newvc duration:0.5 options: Uiviewanimationoptiontransitioncrossdissolve animations:^{
        
} completion:^ (BOOL finished) {
        
transiting = NO;
    }];

This will not appear the bug that you just said.

However, this does not solve my problem!

So the real answer is

after customizing the Tabbarcontroller, you must implement the following

-(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];

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.