수퍼 클래스 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
무엇이 무언지? 당신이 당신의 소스 코드에서 UIViewControllerDebug
의 @implementation
이없는
#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
지금 코드를 게시합니다. – zszen