作者:朱克锋
邮箱:zhukefeng@iboxpay.com
转载请注明出处:http://blog.youkuaiyun.com/linux_zkf
实例截图

@interface TestViewController : UIViewController <UIAlertViewDelegate>
@end
@implementation TestViewController
- (void) alertView:(UIAlertView *) alertView clickedButtonAtIndex: (int) index
{
printf("User selected button %d\n", index);
[alertView release];
}
- (void) showAlert: (NSString *) message
{
UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"ZHUKEFENG" message:message delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"ZHU", @"KE", @"FENG", nil];
av.tag = MAIN_ALERT;
[av show];
}
- (void) action: (id) sender
{
[self showAlert:@"ZHUKEFENG Test Alert"];
}