Posted By

peetj on 06/20/10


Tagged

alert Objective-c UIAlertView


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

umang_nine
bobbym245
cnathan


UIAlertView


 / Published in: Objective C
 

URL: http://www.idev101.com/code/User_Interface/UIAlertView.html

Extended use of the UIAlertView for showing popups

  1. UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Really reset?" message:@"Do you really want to reset this game?" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil] autorelease];
  2. // optional - add more buttons:
  3. [alert addButtonWithTitle:@"Yes"];
  4. [alert show];
  5. [alert release];

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: mr200backstrok on July 3, 2010

This will cause a memory leak. add

[alert release];

after line 4. in order to properly manage memory.

You need to login to post a comment.