fyasar
fyasar

Reputation: 3996

How to change UIAlertView cancel button text

I would like to know that how to change UIAlert's cancel button text during runtime.

Upvotes: 1

Views: 1949

Answers (1)

aegzorz
aegzorz

Reputation: 2219

- (void)showAlertWithTitle:(NSString*)title message:(NSString*)message cancelButtonTitle:(NSString*)cancelTitle {
    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:title message:message delegate:self cancelButtonTitle:cancelTitle otherButtonTitles:nil];
    [alertView show]
    [alertView release];
}

Upvotes: 5

Related Questions