• 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: 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

References: 
 >Why so many public properties all up in my grizzle? (From: Brian Lambert <email@hidden>)

  • Prev by Date: Re: Brace Insertion Tweak
  • Next by Date: problems searching documentation
  • Previous by thread: Re: Why so many public properties all up in my grizzle?
  • Next by thread: Source Control
  • Index(es):
    • Date
    • Thread