1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

A question about SplitViewController

Discussion in 'iPhone/iPad Programming' started by mikezang, Aug 21, 2010.

  1. macrumors 6502a

    #1
    When we create a new project with SplitViewController template, there is some code as below in DetailViewController.m
    Code:
    @interface DetailViewController ()
    @property (nonatomic, retain) UIPopoverController *popoverController;
    - (void)configureView;
    @end
    I want to know why this property is not defined in DetailViewController.h.
     
  2. Moderator

    robbieduncan

    Staff Member

    #2
    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...
     
  3. macrumors 68030

    PhoneyDeveloper

    #3
    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.
     

Share This Page