warning: implicit declaration of function 'TutorialAlertWithMessageAndDelegate'
這裏我的代碼
.h
void TutorialAlertWithMessageAndDelegate(NSString *title, NSString *message, id delegate);
.m
void TutorialAlertWithMessageAndDelegate(NSString *title, NSString *message, id delegate)
{
/* open an alert with OK and Cancel buttons */
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title
message:message
delegate:delegate
cancelButtonTitle:@"Dismiss"
otherButtonTitles: @"Show Tutorial", @"Disable Tutorial", nil];
// otherButtonTitles: @"Show Next Tip", @"Disable Tips", nil];
[alert show];
[alert release];
}
我需要生成該警告的代碼,而不是定義函數的代碼:問題出在哪裏。 – 2010-02-13 05:14:13