• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Multiple simultaneous UIAlertControllers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple simultaneous UIAlertControllers


  • Subject: Re: Multiple simultaneous UIAlertControllers
  • From: Alex Zavatone <email@hidden>
  • Date: Thu, 05 Nov 2015 21:16:44 -0500
  • X_v_e_cd: a1cbebce816bd0b65b52692c84769dc1
  • X_v_r_cd: 10018b89644372c7acbce7bbf3540d43

A queue of content to be in each alerts.

I think we've all had this issue.

If there is more than one alert, then have a little number within the alert so that you know it's alert #n of nn alerts.

And then each OK or Cancel button displays the next alert until they are gone.

Add the alert content to a dictionary and each button as well.  Add the selector for each button as properties.

As each alert is incremented, it just pages on to the next one until the alert is dismissed.

Create a little alert manager that is able to handle a queue of alerts and display them one at a time.



On Nov 5, 2015, at 6:42 PM, Carl Hoefs wrote:

> A queue of what? I would think that if only a single alert view can be
> presented at a time, then iOS would serialize them and present them when
> earlier ones complete. Is there no system-level solution to this?
> -Carl
>
>
>> Make a queue.
>>
>> Sent from my iPhone
>>
>>> On Nov 5, 2015, at 6:10 PM, Carl Hoefs <email@hidden>
>>> wrote:
>>>
>>> I don't want more than 1 alert presented at a time, of course, but they
>>> get generated asynchronously. I thought dispatch_get_main_queue() would
>>> nicely serialize any that occur. Thus David's comment that I'm just
>>> getting the requests issued in a serialized fashion.
>>>
>>> I'm not certain how to have alerts that are scattered all throughout the
>>> app to wait until some other alert's completion block executes. Are you
>>> saying to have it control a global flag or some such?
>>> -Carl
>>>
>>>> On Nov 5, 2015, at 3:53 PM, Eric E Dolecki <email@hidden> wrote:
>>>>
>>>> That's the way. You should never need more than one presented at a
>>>> time.
>>>>
>>>> Sent from my iP6+
>>>>
>>>>> On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński <email@hidden>
>>>>> wrote:
>>>>>
>>>>> You should present next UIAlertController when first one has been
>>>>> dismissed (when UIAlertAction handler is called).
>>>>>
>>>>> Tomek
>>>>>
>>>>>> Wiadomość napisana przez Carl Hoefs
>>>>>> <email@hidden> w dniu 05.11.2015, o godz. 23:37:
>>>>>>
>>>>>> iOS 9.1, iPhone 5S, ObjC
>>>>>>
>>>>>> I'm getting the following runtime warning due to multiple
>>>>>> simultaneous UIAlertControllers presenting at the same time:
>>>>>>
>>>>>> Warning: Attempt to present <UIAlertController: 0x1835c000> on
>>>>>> <MyViewController: 0x17d26e70> which is already presenting
>>>>>> <UIAlertController: 0x18381400>
>>>>>>
>>>>>> I know only one alert view controller can be presenting at a time, so
>>>>>> the way I thought to serialize execution of each
>>>>>> -presentViewController:: is:
>>>>>>
>>>>>>    dispatch_async( dispatch_get_main_queue(), ^{
>>>>>>                        [ self presentViewController: alert
>>>>>>                                            animated: YES
>>>>>>                                          completion: nil ];
>>>>>>                    });
>>>>>>
>>>>>> Why isn't dispatch_get_main_queue() enforcing serialized execution?
>>>>>> Is there another way to do this?
>>>>>> -Carl
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>>
>>>>>> 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
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>>
>>>>> 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
>>>>
>>>> _______________________________________________
>>>>
>>>> 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
>>>
>>>
>>> _______________________________________________
>>>
>>> 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
>>
>
>


_______________________________________________

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


References: 
 >Multiple simultaneous UIAlertControllers (From: Carl Hoefs <email@hidden>)
 >Re: Multiple simultaneous UIAlertControllers (From: Tomasz Muszyński <email@hidden>)
 >Re: Multiple simultaneous UIAlertControllers (From: Eric E Dolecki <email@hidden>)
 >Re: Multiple simultaneous UIAlertControllers (From: Carl Hoefs <email@hidden>)
 >Re: Multiple simultaneous UIAlertControllers (From: Alex Zavatone <email@hidden>)
 >Re: Multiple simultaneous UIAlertControllers (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: Multiple simultaneous UIAlertControllers
  • Next by Date: Re: NSView - trouble setting next responder on 10.10 - works okay on 10.9
  • Previous by thread: Re: Multiple simultaneous UIAlertControllers
  • Next by thread: Re: Multiple simultaneous UIAlertControllers
  • Index(es):
    • Date
    • Thread