• 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
Multiple simultaneous UIAlertControllers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple simultaneous UIAlertControllers


  • Subject: Multiple simultaneous UIAlertControllers
  • From: Carl Hoefs <email@hidden>
  • Date: Thu, 05 Nov 2015 15:37:23 -0700
  • X_v_e_cd: 0de0cd9efb1a7378e7cd59909763f5be
  • X_v_r_cd: d177559a0e98adb8c717793c477c4380

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


  • Follow-Ups:
    • Re: Multiple simultaneous UIAlertControllers
      • From: Tomasz MuszyƄski <email@hidden>
    • Re: Multiple simultaneous UIAlertControllers
      • From: David Duncan <email@hidden>
  • Prev by Date: Adding first Swift file to a framework ("Umbrella header not found")
  • Next by Date: Re: Multiple simultaneous UIAlertControllers
  • Previous by thread: Adding first Swift file to a framework ("Umbrella header not found")
  • Next by thread: Re: Multiple simultaneous UIAlertControllers
  • Index(es):
    • Date
    • Thread