这是主代码:
NSString * title = NSLocalizedString(@"myTitle", @"");
NSString * cancelTitle = NSLocalizedString(@"dismiss", @"");
NSString * otherTitle = NSLocalizedString(@"noMoreTips", @"");
NSString * message = NSLocalizedString(@"myMessage", @"");
[self ShowAlertBox: title : message : cancelTitle : otherTitle];
这就是方法
- (void) ShowAlertBox: (NSString *) title : (NSString *) myMessage : (NSString *) cancelButton : (NSString *) otherButton {
UIAlertView * alertView = [[UIAlertView alloc]
initWithTitle:title
message:myMessage
delegate:self cancelButtonTitle:cancelButton
otherButtonTitles:otherButton, nil ];
[alertView show];
[alertView release];
}
我还尝试从这里删除[alertview release]并将其放入
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
没有任何成功…它还在漏水!!
我错过什么了吗?
谢谢