#import <UIKit/UIKit.h>
@interface ProfileViewController : UIViewController {
UIImageView *profPic;
UILabel *name;
UILabel *hosted;
UILabel *points;
UILabel *attended:
UITableView *tableView;
}
@property (nonatomic, retain) IBOutlet UIImageView profPic;
@property (nonatomic, retain) IBOutlet UILabel name;
@property (nonatomic, retain) IBOutlet UILabel hosted;
@property (nonatomic, retain) IBOutlet UILabel points;
@property (nonatomic, retain) IBOutlet UILabel attended:
@property (nonatomic, retain) IBOutlet UITableView tableView;
@end
答案 0 :(得分:2)
虽然您尚未公布错误,但您的代码中存在两个明显的问题:
行尾的冒号应该是分号:
@property (nonatomic, retain) IBOutlet UILabel attended:
^^^
属性类型应该是指针(在属性声明中忽略'*')
@property (nonatomic, retain) IBOutlet UILabel* attended;
答案 1 :(得分:2)
那些UI *对象应该是指针:
IBOutlet UIImageView * profPic;
答案 2 :(得分:1)
@property (nonatomic, retain) IBOutlet UIImageView *profPic;
在对象名称前添加星号(*)。