Post

Replies

Boosts

Views

Activity

Comment on UIAlertController sometimes does not call its UIAlertAction handler
The “response” variable is declared (with __block) at the top of the alert presentation function and is captured by the block that the function passes to dispatch_async(dispatch_get_main_queue(), ...). This async block creates UIAlertAction objects with handler blocks that also capture (and modify) the “response” variable. I’m open to making “response” a file-level static variable, but I don’t understand how the current local declaration would explain the intermittent symptoms I’ve seen.
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’25