• 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: Why so many public properties all up in my grizzle?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why so many public properties all up in my grizzle?


  • Subject: Re: Why so many public properties all up in my grizzle?
  • From: David Duncan <email@hidden>
  • Date: Fri, 16 Mar 2012 14:06:06 -0700

On Mar 16, 2012, at 2:00 PM, Brian Lambert wrote:

>
> To me, this is how things should be. The implementation details of how my
> view works are hidden.
>
> Am I missing something?


Part of the problem was that prior to Xcode 4, IBOutlets needed to be declared in the header, or Interface Builder wouldn't find them (ditto for IBActions). As such the best you could do was declare the instance variables in the header and pre-pend them with IBOutlet, then declare your properties in a class extension.

That time has passed now, so you can now completely specify IBOutlets (and IBActions) in your implementation file and hide the details from the outside world. If you want properties, you can use a class extension like so to add them:

@interface ViewController()

@property …
// etc

@end

And you can just declare your IBActions on methods that you don't expose to the outside world entirely.
--
David Duncan

_______________________________________________

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


  • Follow-Ups:
    • Re: Why so many public properties all up in my grizzle?
      • From: Marco Tabini <email@hidden>
References: 
 >Why so many public properties all up in my grizzle? (From: Brian Lambert <email@hidden>)

  • Prev by Date: Why so many public properties all up in my grizzle?
  • Next by Date: Re: Why so many public properties all up in my grizzle?
  • Previous by thread: Why so many public properties all up in my grizzle?
  • Next by thread: Re: Why so many public properties all up in my grizzle?
  • Index(es):
    • Date
    • Thread