The synthesized getter property follows the cocoa naming convention for returning "owned" objects

I'm curious if cocos2d has any naming convention for a variable?

I have it

//.h NSMutableArray *newRowForCounter; 

and

 //.m @synthesize newRowForCounter; 

and with @synthesize this warning "the synthesized getter property follows the cocoa naming convention to return" owned "objects", but if I change the name to something else, it works fine.

I am also trying to rename the begin variable with new- {EX newVariable ...), this still warns me about this.

thanks

My gamma may look bad because of this

+4
source share
1 answer

new cannot be used in the variable name at the beginning. That is why it shows an error.

Sol: declare a property whose name begins with new, if you did not specify another getter:

 // Won't work: @property NSString *newTitle; // Works: @property (getter=theNewTitle) NSString *newTitle; 

Explanations here and here.

+41
source

All Articles