I haven't touched this code in a while so I'm wondering if there are any obvious things that would cause the problem I'm running into.
I'm displaying a UIAlertView to the user after they perform a search query. This worked fine until I started testing on iOS 6.1 (or this particular iPad 2 I'm using for that matter). Now it acts as normal until dismiss the UIAlertView and then the screen stays dimmed for a few seconds.
This didn't seem like a problem, other than a bit of lag, until I noticed that I could still touch a table view in my app which causes flickering of the screen to occur.
The code is on my github: ipwnstuff/shodan
Make sure that you are displaying (and dismissing if doing so programmatically) the alert on the main thread, along with all other interactions with UIKit. The easiest way is to use a block:
dispatch_async(dispatch_get_main_queue(), ^{
// Display/dismiss your alert
});
Using lnafziger's answer I showed the alertView on the main thread rather than dismissing it. Which fixed the problem too.
[alert performSelectorOnMainThread:@selector(show) withObject:nil waitUntilDone:YES];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With