iphone - Multiple Modal-view Transitions Crash App -


I show confirmation page after would render many modal view sequence (select an image from eg. The image picker) my problem It is that the animation has always crashed with an EXC_BAD_ACCESS for the dismissal and to be presented in steps after no delay.

I think the problem is that the CoreAnimation does not differentiate between the two variations and may not know exactly what has already been finished or not.

My work around now is to delay the work in section 1 which resolves the problem. However, I think this code makes a bit weaker. Is there any other solution?

Is this a bug in UIKit and should I submit a bug report?

Sample code

Here is a simple case that regenerates the accident:

  1. Create a new View-based project with the class as the implementation of the main controller

the expected behavior: The poster view is rejected and presented again due to a subsequent call in viewDidAppear.

Actual Behavior:. Accidents with stack trace presented below:

Code:.

  #import "SampleViewController.h" @ implementation sample sequence controller - (minus) Somodl {UIImagePickerController * picker = [[UIImagePickerController alloc] init]; [Self current model visual controller: animated picker: yes]; // [picker release]; } - (zero) viewDidAppear: (BOOL) animated [[Super Viewedapper: Animated]; [Self showdown]; // This line works as desired by the app / / // [Self Performance Selector: @ object with the selection: after zero: 1]; } @end  

Crash Stack trace:

 # at 0 0x30b43212 - [UIWindowController transitionViewDidComplete: fromView: toView:] # 1 in 0x3095828e - [notifyDidCompleteTransition UITransitionView: ] # 2 0x3091af0d - [UIViewAnimationState sendDelegateAnimationDidStop: Finished:] in # 3 0x3091ad7c - [UIViewAnimationState animationDidStop: Finished:] # 4 0x00b54331 in run_animation_callbacks # in 5 0x00b54109 in CA :: timer_callback # 6 CFRunLoopRunSpecific # in 0x302454a0 # 8xx2020c31 7 0x30244628 CFRunLoopRunInMode in GSEventRunModal # 9 0x32044cf6 GSEventRun # 10 0x309021ee UIApplicationMain # 11 0x00002794 mainly in main.m: 14 

Chances are you can reference the animation Let's finish. As you already know

[self performSelector: @selector (showModal) withObject: afterDelay zero: 1];

Works, but obviously, having a delay is not good, so do it:

  [Self display selector: @selector: Object with: After zero: 19];  

use afterDelay: 0.0 does not directly call the selector, instead it is its runloop, which allows all of its state (autorelease pool, animation contexts, etc.) But the invocation enqueues right then say right when the phenomena of renalop processing begins.

An issue that could be a problem is that users can close UIEvents by tapping on the screen, but you can correct it by calling it before you are starting the animation

forgetting to start [[UIPAC shared sharing]];

And this time when you make your last model on the screen

  [[UIApplication shared application] end exploration intentions events];  

Usually you want to spend UI interaction, while you are animating quick changes.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -