Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From my experience, the best way to istantiate the detail view controller is:</p> <pre><code>MyDetailController * dc = [[MyDetailController alloc] initWithMyObject: anObject]; [self.navigationController pushViewController: dc animated: YES]; [dc release]; </code></pre> <p>where anObject is the piece of your downloaded data you want to present in the detail view controller.</p> <p>I assume your list controller is the main one of your app, which should be instantiate as follows:</p> <pre><code>- (BOOL) application: (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions { _baseWindow = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; _listVC = [MyListController new]; [_baseWindow addSubview: _listVC.view]; [_baseWindow makeKeyAndVisible]; return YES; } </code></pre> <p>And released:</p> <pre><code>- (void) dealloc { [_listVC release]; _listVC = nil; [_baseWindow release]; _baseWindow = nil; [super dealloc]; } </code></pre> <p>Remember that -viewDidLoad is called after -loadView, which in turn is called when someone tries to access the -view property of the view controller.</p> <p>Thus you may want to prepare your view in -viewDidLoad and do some additional tasks in -viewWillAppear or -viewDidAppear. Please note that -viewWillAppear (and similar methods) is called EVERY TIME that view controller's view is shown on screen. That is, for example, if you push another VC from detail vc and then pop, -viewDidAppear will be called again.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload