Karelia Community Forum

Join a conversation, pose a question, or help a fellow user: The best place to discuss all things Karelia.

You are not logged in.

#1 February 6, 2012 1:58 pm

seanc
Hero

Awake from NIB?

Mike, this is a follow up from my "API Missing" question, regarding "SVIndexInspectorViewController" vs "SVInspectorViewController".  I did not notice this difference until I recently included "awakeFromNib" in the controller.

Subclassed from "SVInspectorViewController", awakeFromNib only invokes once, but ...

Subclassed from "SVIndexInspectorViewController", awakeFromNib invokes TWICE in a row

Is this normal/expected?  Why twice?  Once for the "drag" controller & once for my controls?

Sean

Offline

#2 February 7, 2012 5:17 am

mikeabdullah
Administrator

Re: Awake from NIB?

Yeah, this is expected. Index Inspectors are made up of two nibs – one for the drag control, one for your custom stuff. In general I'd say to do this instead:

- (void)loadView
{
  [super loadView];
  // Custom setup goes here
}

Offline

#3 February 7, 2012 7:27 am

mikeabdullah
Administrator

Re: Awake from NIB?

I'll update our docs to include this too.

Offline

Board footer

Powered by FluxBB