Calling UIAlerts from a separate thread
2009-07-02 04:58If you show a UIAlert from a separate thread, you may get a _WebThreadAutoLock exception, especially if that alert contains a lot of text (which changes the UIAlert to have a scrolled text field).
To fix it’s easy, simply change where you had:
to
[alert performSelectorOnMainThread:@selector(show) withObject:nil waitUntilDone:NO];
That will run the alert on the main thread. You can also [release] the alert instance immediately, as the scheduler retains it for you.



