Note that there are some explanatory texts on larger screens.

plurals
  1. POTwo UIViewController, one XIB File
    primarykey
    data
    text
    <p>Let's say, I have three UIViewController</p> <ul> <li>UserFormViewContoller</li> <li>NewUserFormViewController : UserFormViewController</li> <li>UpdateUserFormViewController : UserFormViewController</li> </ul> <p>So, NewUserFormViewController and UpdateUserFormViewController view controller inherit from it's parent to share the basic functionality. The different will be their method, create and update.</p> <p>The views also have a lot of things in common, almost everything. The different view components between NewUserFormViewController and UpdateUserFormViewController is a button to perform save task (create or update)</p> <p><strong>Is it possible to have two UIViewController sharing one XIB file?</strong> Let's say, UserFormViewController.xib and then I do </p> <pre><code>[[NewUserFormViewController alloc] initWithNibName@"UserFormViewController" bundle:nil]; [[UpdateUserFormViewController alloc] initWithNibName@"UserFormViewController" bundle:nil]; </code></pre> <p>The other question but important is, <strong>when I edit xib file with Interface Builder, what owner's reference outlets and IBActions is it talking about, NewUserFormViewController or UpdateUserFormViewController?</strong> (IBActions and Outlets showing when we right click at the Placeholders -> File's Owner)</p> <p>If that's so, I will just use one XIB file and programmatically add other specific view component (It would be great to have only one XIB file so that I can make some changes at a place but effective on both)</p>
    singulars
    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.
 

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