我使用超類UIController創建了一個自定義超類UIControllerDebug。如何用UIViewController創建子類UIViewControllerDebug?
我和其他一些子類一起使用這個類。它與:
Undefined symbols for architecture i386:
"_OBJC_METACLASS_$_UIViewControllerDebug", referenced from:
_OBJC_METACLASS_$_Main in Main.o
"_OBJC_CLASS_$_UIViewControllerDebug", referenced from:
_OBJC_CLASS_$_Main in Main.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
什麼是渴望?
代碼在這裏: .H
#import <UIKit/UIKit.h>
@interface UIViewControllerDebug : UIViewController
@end
.M
#import "UIViewControllerDebug.h"
@implementation UIViewControllerDebug
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
Output(@"[v]%@ touchesBegan",NSStringFromClass([self class]));
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
Output(@"[v]%@ touchesBegan",NSStringFromClass([self class]));
}
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
Output(@"[v]%@ touchesBegan",NSStringFromClass([self class]));
}
@end
發佈一些代碼:) – janusbalatbat 2012-03-10 07:31:16
我現在發佈代碼。 – zszen 2012-03-10 07:42:33