objective c - How to load a NIB from NIB in iOS -


i have customviewcontroller created via xib.

i created customview via different xib file subclass os uiview.

then drug uiview customviewcontroller , set class customview.

problem here: run app did not see content of customview created in customview xib.

why , how can fix it?

i need have customview in customviewcontroller because need set layout of view.

i can load customview viewdidload, need load xib

uiview *v = [[[nsbundle mainbundle] loadnibnamed:@"topsegmentedcontrol" owner:self options:nil] firstobject ]; [self.view addsubview:v]; 

i think should think changing uiview subclass inherits uiviewcontroller, , added hierarchy child viewcontroller. if can add containerview object inspector pallet there in interface builder outer viewcontrollers view, , it'll add new (nib within nib) there paste into..

i think recent changes in cocoa , cocoatouch apple don't want loading simple views nibs. note 'files owner' proxy top labelled 'viewcontroller'


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -