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: Simon Wilson <email@hidden>
- Date: Tue, 20 Mar 2012 10:03:25 +0100
> It seems to be the case that when people are developing a UIViewController subclass or a UIView subclass that they expose *all* the implementation details of that class through public properties vs. using ivars.
There's no need to use @property. Just manually declare your IBOutlets as @private variables:
@interface MyViewController : UIViewController
{
@private
IBOutlet UILabel * label;
}
Only add accessors (manually or with @property) for those ivars you want to be public. If you want to use accessors within your controller then add accessor methods to the implementation file without declaring them in the header file.
Simon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden