2010-10-27 77 views
0
#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 
+1

什麼錯誤?我看不到任何錯誤?我看到的只是源代碼。 – paxdiablo 2010-10-27 06:00:06

回答

2

的UI *對象應該是指針:

IBOutlet UIImageView * profPic; 
2

雖然還沒有發佈你得到什麼錯誤出現在你的代碼是2個顯而易見的問題:

在該行的末尾
  1. 結腸應分號:

    @property (nonatomic, retain) IBOutlet UILabel attended: 
                     ^^^ 
    
  2. 屬性的類型應該是指針(屬性聲明中缺少'*')

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

對象的名稱前添加星號(*)。