I have a questionnaire app which consists of several questions. All questions have a standardised format that consists of a question (pulled from a database) and a slider for answering (they are 0-5 scaled based questions).
I have created two xib files. One for the questionnaire and one for a question. I want the questionnaire.xib to have only a navigation controller responsible for swapping views (i.e. changing questions) when the user h开发者_如何学Cas answered the question. This xib will also need to embed several question.xib's that animate in as the user presses the next button in the navigation controller of the questionnaire.xib.
How is it possible to embed one xib into a navigation based xib..
If you want to load a nib without also instantiating a controller for it, then you can use:
– loadNibNamed:owner:options:
It will return an array with all the top-level object that are defined in the xib file.
You could load this way the xib related to the individual question, and place the UIView
(or other UIKit objetcs) it defines in the questionnaire's view.
精彩评论