Re: Why so many public properties all up in my grizzle?
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