I sent this yesterday to the list but then never saw it posted so am resending 
it.
=====
I noticed an issue in using an UIActionSheet in combination with a 
UIImagePickerController and thought I'd shared what I've seen and a work 
around.  I ported some working code from Xcode to MonoTouch and got a crash 
with "Application tried to present modally an active controller".  The use case 
is a UIActionSheet displaying 2-3 buttons and then from the 
UIActionSheet.Clicked event displaying a UIImagePickerController.

On the first call from the ActionSheet to the ImagePicker it works fine all the 
way through the cancel from the image picker.  However, the second time I make 
the call it fails when trying to display the UIImagePickerController with the 
above mentioned error.

One thing I did in comparing my Xcode vs MT code is that I was using the 
Clicked event on the action sheet vs the action sheet delegate method 
didDismissWithButtonIndex.  I decided to write a simple delegate class and 
override the Dismissed method.  Now my code works with no errors.

Is there a difference in how the delegate Dismissed method works vs the Clicked 
event?  You would think they'd behave the same but it appears that they do not.

Thanks.
Gerry
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to