UIView.hpourquoi ne reconnaîtra-t-il pas le @properties du fichier d'en-tête du fichier principal?
#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
Comme mentionné dans mon message; vous essayez de réimplémenter UIView; ce n'est évidemment pas bon, car cette classe existe déjà et existe définitivement. Vous devez renommer votre classe et l'implémenter en tant que sous-classe à UIView (par exemple MyView, bien que des noms plus descriptifs soient généralement préférés) –