Understanding iOS Compiler Errors – Missing Context for Property Implementation Declaration



0
0
1
78
448
Oak Leaf Enterprises, Inc
3
1
525
14.0







Normal
0




false
false
false

EN-US
JA
X-NONE










































































































































































You typically get this compiler error if you try to synthesize a property outside of a class implementation. For example, the following code tries to synthesize the deck property before the @implementation declaration that marks the beginning of the class:


@synthesize deck = deck_;
@implementation PlayingCardBackViewController



 To fix the problem, just move the @synthesize  declaration after the @implementation declaration and before the @end declaration:



@implementation PlayingCardBackViewController
@synthesize deck;


For explanations of other compiler errors and warnings, check out our new book site: http://www.iOSAppsForEveryone.com

Kevin McNeish
Eight-time .NET MVP Recipient
Apple iOS Author, Trainer


 

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>