EK_AllDay
EK_AllDay

Reputation: 1115

IOS View changing

I am creating a tutorial inside my iphone app. I am wondering, do I need to create a new .h .m and .xib file for every view? Or can I hook up multiple .xib files to the same .h file , than use the .m file to switch between the views?

Example

I have a Table View being displayed with multiple options. The user selects an option and that tutorial begins in a different view. Can I use that new views .h .m files to control multiple .xib files, or does each view need their own view controller.

Thanks

Upvotes: 0

Views: 125

Answers (2)

Eugene
Eugene

Reputation: 10045

You generally should have a view controller per screen if the screen contains active UIControl elements like UIButton. So if first screen has 3 buttons, second has 2 buttons and all of them perform different selectors, then you'd better stick to having a view controller per view.

For the case where user selects an entry from UITableView, you absolutely definitely want to use a separate view controller.

Upvotes: 2

Thiago Baisch
Thiago Baisch

Reputation: 211

Now in iOS 5.0 +, I recommend you to use storyboards, they are more simple to use and have more features then the .xib files.

Search for a Storyboard tutorial on Google, or take it in Apple Docs: https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/SecondiOSAppTutorial/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011318

Upvotes: 0

Related Questions