objective c - Method not running - iOS -


I have a very easy method though UIAlertView will not run in the method .... This is my method:

< Pre> - (zero) post_result {nslog (@ "post result"); Post_now.enabled = Yes; [Active stop animation]; [[UIApplication ShareApp] setNetworkActivityIndicatorVisible: no]; UIAlertView * alertView = [[UIAlertView alloc] initWithTitle: @ "Success" Message: @ "You have successfully uploaded posts." Representative: Cancel selfTuttonite: @ "Dismiss" other button titles: zero]; [Show warning view]; Success_post_facebook = 0; Success_post_youtube = 0; Success_post_googleplus = 0; Success_post_tumblr = 0; Success_post_twitter = 0; NSLog (@ "Post results and"); }

The strange thing is that earlier and later codes of UIAlertView will run in this method .... So what is wrong with an earth ??

Thank you for your time.

You see the UIAlertView not on the main thread that you are most likely calling it to run on the main thread Just use the main send queue for this.

  Sender_Assic (sender_jet_man_que), ^ {UIAlertView * alertView = [[UIAlertView alloc] initWithTitle: @ "Success" Message: @ "You have successfully uploaded the post." Representative: cancel itselfTutton title: @ "sack" other buttontimes: zero]; [Alert view show];});  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -