Now that the GateGuru team has been developing on the iOS 5 SDK for awhile, I thought I'd pull together some lessons learned.
- Declare your IBOutlet and IBActions within the private category within your implementation file. This makes them visible to interface builder without cluttering up the external interfaces and leaking implementation details.
- Declare your IBOutlet properties as (nonatomic, weak). The weak reference implies a non-owning reference and ARC will nil it as necessary.
- Delegate properties should be (nonatomic, weak) as well.
- The designated initializer for UIView's is initWithFrame: when initialized programmatically. When loaded from a Storyboard or custom Nib, it is initWithCoder:
- The designated initializer for UIViewController's is initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil when initialized programmatically. It is initWithCoder: when loaded from a Storyboard or Nib.