Display a UIAlertView after dismissing an action sheet?
Display a UIAlertView after dismissing an action sheet?
- Subject: Display a UIAlertView after dismissing an action sheet?
- From: Michael Crawford <email@hidden>
- Date: Sat, 25 Apr 2015 03:01:12 -0700
My iOS App includes some simple file management, that enables the user
to save the state of their game as well as to exchange the game states
with other people.
I have a sheet that looks like this:
Title: File Management
Destructive Option: Delete File
Open
Save
I also specify a "Cancel" item which does not display on the iPad, as
the user can cancel by tapping outside.
When they tap Save I want to prompt the user for a filename with
UIAlertView. This is where my question came up before, regarding that
alert having zero size. I'm using the newer API now, with the style
that prompts for text.
If I do it in a straightforward way the alert is not displayed.
If I called "usleep( 1500000 )" the alert is briefly displayed then dismissed.
My delegate's "clickedButtonAtIndex" method is never called.
I think the problem is that I need to be certain that the action sheet
is all the way dismissed before I show the alert. I think that's what
all the stuff about runloops was in my previous question, that didn't
make sense to anyone. I got that from Erica Sadun's "iPhone
Developer's Cookbook".
I expect what's happening is that the user taps "Save" in the action
sheet, then the iOS calls my "doSave" IBAction, then ultimately from
doSave, the alertview is displayed. That leads to the instantiation
of the alertview being - indirectly - a subroutine of the action
sheet.
Maybe it would work if doSave called NSObject's "performSelector" I'll
give that a try while I eagerly await your responses.
Mike
--
Michael David Crawford, Consulting Software Engineer
email@hidden
http://www.warplife.com/mdc/
Available for Software Development in the Portland, Oregon Metropolitan
Area.
_______________________________________________
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