I am using the asynchronous request of NSURL connection, but I want to pop up an alert if there is an error (by looking at the error in the completion handler). The problem is that I generate an exception. I believe this is because I am calling UIKit from a secondary thread.
I was expecting this, so I set up a method on my view controller to present an alert and tried calling that method from within my completion handler using the [self performSelectorOnMainThread] but it still does not work.
Does anyone have any idea how I may be able to remedy this?
I was expecting this, so I set up a method on my view controller to present an alert and tried calling that method from within my completion handler using the [self performSelectorOnMainThread] but it still does not work.
Does anyone have any idea how I may be able to remedy this?