uibutton - How do I add a UIAlertView on the press of a button? -


i want create uialertview on press of button. in game tell player little level before proceed , uialterview. how do make come when press button?

in action button function put code:

uialertview *message = [[uialertview alloc] initwithtitle:@"title of popup"                                                   message:@"the message display user"                                                  delegate:nil                                         cancelbuttontitle:@"ok"                                         otherbuttontitles:nil]; [message show]; 

if don't use arc should release allocated variable after using "show" method:

[message release]; 

hope helps.

source: http://www.mobiledev.nl/popup-message-in-ios/


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -