I have what I think is a UX operation happening on a background thread. In a method that uses blocks, in the success I am calling:
[self.navigationController popViewControllerAnimated:TRUE];
I am getting a crash, so I am thinking that checking the current thread and calling performSelectorOnMainThread might fix this, but I am not sure how to setup the @selector portion of the call.
[self performSelectorOnMainThread:@selector([self.navigationController popViewControllerAnimated:TRUE]) withObject:nil waitUntilDone:NO];
is not working. What is the proper syntax?
To force the method to perform on the main thread you can use:
dispatch_async(dispatch_get_main_queue(), ^{
[self.navigationController popViewControllerAnimated:TRUE];
});
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