Re: Private Methods
Re: Private Methods
- Subject: Re: Private Methods
- From: Dave <email@hidden>
- Date: Wed, 26 Aug 2015 19:15:31 +0100
>> Does anyone prefix their private method names like Apple recommends when subclassing a large Cocoa framework class?
>>
>> Also why does Apple say "If you are subclassing a large Cocoa framework class”. What if I am subclassing a small Cocoa framework class. What difference would it make?
Usually my Class would have a name like LTWConfigValidation, so for private methods I tend to call internal methods something like:
validationFindNextItem:
If I don’t prefix the name, then I’d make it more verbose:
findNextItemInArray or whatever.
Also, I prefix properties with “p” and instance variables with “m”.
This minimises to almost nothing the chance of getting conflicts.
Cheers
Dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden