View Full Version : A question about SplitViewController

Aug 21, 2010, 04:36 AM
When we create a new project with SplitViewController template, there is some code as below in DetailViewController.m

@interface DetailViewController ()
@property (nonatomic, retain) UIPopoverController *popoverController;
- (void)configureView;

I want to know why this property is not defined in DetailViewController.h.

Aug 21, 2010, 04:37 AM
Apple intend it to be private to that class: no external instance should be setting/getting it. Not sure why Apple have made that decision but there you go...

Aug 21, 2010, 03:17 PM
That is the standard idiom for making methods private, since Objective-C doesn't have a private keyword that works for methods in the class declaration.

This is a class extension. See the Objective-C 2.0 Language guide for more on class extensions.

And, as robbie mentions, the intention is to make the popover property and the configureView method private.