2013-04-25 48 views
-1
#import <UIKit/UIKit.h> 

@interface ViewController : UIViewController 
@property (weak, nonatomic); 
@property (weak, nonatomic); 

@end 

我在@property行上得到了相同的錯誤。它告訴我「類型名稱需要說明符或限定符」。這是';'在兩條線上。什麼是Xcode 4.6.2中的「類型名稱需要說明符或限定符」?

請幫忙!

+1

提示:看一個'@property在一些工作代碼中聲明。將它與你的相比。有什麼你的失蹤? – 2013-04-25 02:44:29

+0

請點擊此處尋求幫助:http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html – wquist 2013-04-25 02:46:09

回答

1

你沒有正確地宣佈你的財產,你需要告訴它什麼樣,你有對象,什麼名稱是:

例如

@property (copy, nonatomic) NSString *title; 
@property (assign, nonatomic) BOOL *hasReadDocumentation; 
相關問題