• 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: iOS nib weirdness...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS nib weirdness...


  • Subject: Re: iOS nib weirdness...
  • From: glenn andreas <email@hidden>
  • Date: Wed, 04 May 2011 10:17:36 -0500

On May 4, 2011, at 9:00 AM, Steve Christensen wrote:

> I'm working on an app that uses a tab bar. I created a new nib to set up a view+controller and added a new tab item to the main nib that references the controller and the controller's nib, plus I filled in some basic functionality in the view controller. Since it's relevant, the controller's IBOutlets are
>
> IBOutlet MyTableView* _resultsTable;
> IBOutlet UIActivityIndicatorView* _searchActivityIndicator;
> IBOutlet UISearchBar* _searchBar;
>


First step:  Don't prepend your ivars with underscores.

From <http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingBasics.html>, and I quote:

"	• Avoid the use of the underscore character as a prefix meaning private, especially in methods. Apple reserves the use of this convention. Use by third parties could result in name-space collisions; they might unwittingly override an existing private method with one of their own, with disastrous consequence."



You may be seeing one of those "disastrous consequences"



Glenn Andreas                      email@hidden
The most merciful thing in the world ... is the inability of the human mind to correlate all its contents - HPL

_______________________________________________

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: iOS nib weirdness...
      • From: Steve Christensen <email@hidden>
References: 
 >iOS nib weirdness... (From: Steve Christensen <email@hidden>)

  • Prev by Date: Request for beta testers/feedback for programmer utility [please reply off-list]
  • Next by Date: Re: iOS nib weirdness...
  • Previous by thread: Re: iOS nib weirdness...
  • Next by thread: Re: iOS nib weirdness...
  • Index(es):
    • Date
    • Thread