• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Private Methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Private Methods (From: Richard Charles <email@hidden>)
 >Re: Private Methods (From: email@hidden)

  • Prev by Date: Re: Auto Layout and XCode/IB Warnings
  • Next by Date: NIB Loading Problem
  • Previous by thread: Re: Private Methods
  • Next by thread: Re: Private Methods
  • Index(es):
    • Date
    • Thread