Re: Unbalanced calls to begin/end appearance transitions for UIViewController
Re: Unbalanced calls to begin/end appearance transitions for UIViewController
- Subject: Re: Unbalanced calls to begin/end appearance transitions for UIViewController
- From: Sebastian Celis <email@hidden>
- Date: Thu, 24 Apr 2014 07:53:00 -0500
On Thu, Apr 24, 2014 at 6:22 AM, Torsten Curdt <email@hidden> wrote:
> Based on the Apple documentation I came up with the following method
> to switch between controllers in a containment controller.
>
> But when there is an oldC I am getting "Unbalanced calls to begin/end
> appearance transitions for <...>" on the console.
>
> - (void) showController:(UIViewController*)newC
> withView:(UIView*)contentView animated:(BOOL)animated
> {
> <snip>
> [contentView addSubview:newC.view];
> <snip>
> }
>
Try it again without this addSubview call.
transitionFromViewController:toViewController:duration:options:animations:completion:
automatically adds the new view, performs the animation, and then removes
the old view. In your logic that does not call
transitionFromViewController:toViewController:duration:options:animations:completion:
you will have to do this yourself.
- Sebastian
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden