我有一個類如下IPhone:如何從一個靜態函數
#import "UtilAlert.h"
@implementation UtilAlert
+(void) showAlert:(NSString *)message andTitle:(NSString *)title andDelegate:(UIViewController *) delegate
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:delegate cancelButtonTitle:@"Cancel" otherButtonTitles:nil];
[alert show];
}
@end
的問題,請致電AlertView是,當調用必要參數的功能...
[UtilAlert showAlert:@"hello" andTitle:@"hello" andDelegate:self] ;
,我收到了錯誤:線程1:停在斷點3;
用於從UIController類
你可以發佈你的.h文件嗎? – mbh 2012-02-10 06:21:20