Objective c 什么';所有这些错误是怎么回事? #导入 @界面配置文件ViewController:UIViewController{ UIImageView*profPic; UILabel*名称; UILabel*托管; UILabel*点; UILabel*出席: UITableView*表格视图; } @属性(非原子,保留)IBUIImageView profPic; @属性(非原子,保留)标签名称; @属性(非原子,保留)IBUILabel托管; @属性(非原子,保留)标签点; @属性(非原子,保留)IBUi: @属性(非原子,保留)IBUITableView tableView; @结束
虽然您尚未公布您所收到的错误,但代码中有两个明显的问题:Objective c 什么';所有这些错误是怎么回事? #导入 @界面配置文件ViewController:UIViewController{ UIImageView*profPic; UILabel*名称; UILabel*托管; UILabel*点; UILabel*出席: UITableView*表格视图; } @属性(非原子,保留)IBUIImageView profPic; @属性(非原子,保留)标签名称; @属性(非原子,保留)IBUILabel托管; @属性(非原子,保留)标签点; @属性(非原子,保留)IBUi: @属性(非原子,保留)IBUITableView tableView; @结束,objective-c,xcode,Objective C,Xcode,虽然您尚未公布您所收到的错误,但代码中有两个明显的问题: 行末尾的冒号应为分号: #import <UIKit/UIKit.h> @interface ProfileViewController : UIViewController { UIImageView *profPic; UILabel *name; UILabel *hosted; UILabel *points; UILabel *attended: UITableVi
#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
虽然您尚未公布您所收到的错误,但代码中有两个明显的问题:
#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
这些UI*对象应该是指针:
@property (nonatomic, retain) IBOutlet UILabel* attended;
这些UI*对象应该是指针:
@property (nonatomic, retain) IBOutlet UILabel* attended;
在对象名称前添加星号(*)
在对象名称前添加星号(*)。有什么错误?我看不到任何错误?我看到的只是源代码。什么错误?我看不到任何错误?我看到的只是源代码。
@property (nonatomic, retain) IBOutlet UIImageView *profPic;