UIView.h왜 main 파일의 헤더 파일에서 @properties를 인식하지 못합니까?
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface UIView : UIResponder {
IBOutlet UILabel *endLabel;
IBOutlet UIButton *goButton;
IBOutlet UITextField *textBox1;
IBOutlet UITextField *textBox2;
@property(nonatomic, retain) UILabel *endLabel;
@property(nonatomic, retain) UIButton *goButton;
@property(nonatomic, retain) UITextField *textBox1;
@property(nonatomic, retain) UITextField *textBox2;
}
- (IBAction)goButtonClicked;
@end
UIView.m
#import "UIView.h"
@implementation UIView
@synthesize textBox1, goButton;
@synthesize textBox2, goButton;
@synthesize textBox1, endLabel;
@synthesize textBox2, endLabel;
@synthesize goButton, endLabel;
- (IBAction)goButtonClicked {
}
@end
내 게시물에 언급 된대로; UIView를 다시 구현하려고합니다. 이 클래스는 이미 분명히 존재하기 때문에 이것은 분명히 좋지 않습니다. 클래스의 이름을 변경하고 UIView의 하위 클래스로 구현해야합니다 (예 : MyView). –