开发者

what's with all of these errors?

开发者 https://www.devze.com 2023-01-21 08:52 出处:网络
#import <UIKit/UIKit.h> @interface ProfileViewController : UIViewController { UIImageView *profPic;
#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 (nonat开发者_如何学Goomic, retain) IBOutlet UILabel attended:
@property (nonatomic, retain) IBOutlet UITableView tableView;

@end


those UI* objects should be pointers:

IBOutlet UIImageView * profPic;


Although you have not posted what exactly errors you get there're 2 obvious problems in your code:

  1. Colon in the end of the line should be semicolon:

    @property (nonatomic, retain) IBOutlet UILabel attended:
                                                          ^^^
    
  2. Types of properties should be pointers ('*' missed in property declarations)

    @property (nonatomic, retain) IBOutlet UILabel* attended;
    


@property (nonatomic, retain) IBOutlet UIImageView *profPic;

Add the Asterisk(*) before the name of the object.

0

精彩评论

暂无评论...
验证码 换一张
取 消