Table of contents
Share Post

Tout simplement comme ceci :

[code=”c#”] UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@”Title of the box” message:@”The message to show” delegate:self cancelButtonTitle:@”OK” otherButtonTitles:nil];;;[/code]

Le mieux à faire est de créer une méthode que vous placez dans un groupe de fichier .h/.m, comme ceci :

[code=”c#”] + (void)alert:(NSString *)title message:(NSString *)theMessage button:(NSString *)buttonTitle {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:theMessage delegate:self cancelButtonTitle:buttonTitle otherButtonTitles:nil];
;
;
}[/code]

laurent

Stay in the loop

Subscribe to our free newsletter.

Related Articles