下面的代碼是給我的「錯誤無法找到接口聲明‘StartTimerViewController’問題Objective-C的分類
#import "StartTimerViewController.h"
@interface StartTimerViewController (timerMethods)
-(void)startTimer:(id)sender withTimeIntervalInSeconds:(NSTimeInterval)time
andMessage:(NSString *)message
notificationChoice:(BOOL)notificationChoice
andWithLabel:(UILabel *)theLabel;
-(void)updateLabel:(NSTimer *)timer;
@end
爲什麼會發生這種情況?StartTimerViewController.h確實存在,是一個有效的I類編碼。這個文件,應該是延長StartTimerViewController類別。
這裏的StartTimerViewController.h年初
#import <UIKit/UIKit.h>
#import "StartTimerViewController+timerMethods.h"
@interface StartTimerViewController : UIViewController {
你的`StartTimerViewController.h`看起來像什麼?嘗試一個乾淨的和構建,看看Xcode這次找到你的班。 – BoltClock 2011-02-11 15:41:36