0

on iOS5 I can use method to show UIAlertView:

[alert performSelectorInBackground: @ selector (show) withObject: nil];

on iOS6 crash my app, why?

That the replacing?

Thanks

jigfox
  • 18,057
  • 3
  • 60
  • 73
Edi
  • 1,728
  • 2
  • 13
  • 13

2 Answers2

0

Why are you performing that selector in the background? Showing an alert view probably isn't something you want to be doing on a background thread.

Max
  • 577
  • 5
  • 13
  • performSelector in background runs that selector on a background thread so that it doesn't stop other tasks from performing on the main thread. I don't think it's really what you're looking for here. Just change it to [alert show] – Max Dec 07 '12 at 13:15
0

You aren't suppose to do UI stuff in the background. It will make your app crash. You normally do stuff like loading data from a server in the background or computational expensive operation, but never do anything that's in the UIKit framework in a background thread.

Yuliani Noriega
  • 1,085
  • 12
  • 23