iPhone Programming: Custom Methods with Parameters

Published: 27 November 2011
on channel: MilmersXcode
1,554
14

I teach you how to show a UIAlertView using a custom method with parameters.

-(void)createUIAlertViewWithTitle:(NSString *)title andMainText:(NSString *)mainText withCancelButton:(NSString *)cancelButton andOtherButtons:(NSString *)otherButton;

-(void) createUIAlertViewWithTitle:(NSString *)title andMainText:(NSString *)mainText withCancelButton:(NSString *)cancelButton andOtherButtons:(NSString *)otherButton
{
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:title
message:mainText
delegate:self
cancelButtonTitle:cancelButton
otherButtonTitles:otherButton, nil];
[alert show];
[alert release];
}

[self createUIAlertViewWithTitle:@"Title" andMainText:@"Main Text" withCancelButton:@"Cancel" andOtherButtons:@"Other"];

NSInvocation Tutorial:    • iPhone Programming: NSInvocation - Storing...  

Twitter:   / failcakeapps  
Apple Developer Center: http://developer.apple.com/devcenter/...
Website: http://failcake.webs.com/
Channel:    / milmersxcode  


On this page of the site you can watch the video online iPhone Programming: Custom Methods with Parameters with a duration of hours minute second in good quality, which was uploaded by the user MilmersXcode 27 November 2011, share the link with friends and acquaintances, this video has already been watched 1,554 times on youtube and it was liked by 14 viewers. Enjoy your viewing!