Xcode Storyboarding

2337
2
Jump to solution
03-01-2013 03:37 PM
ShiminCai
Occasional Contributor III
Hi,

Is it possible to write apps like OnlineOfflineEditingSample, FeatureLayerEditingSample, etc using Xcode storyboard? In these apps the buttons on the navigation item are dynamically loaded/changed. Do I have to dynamically create and attach a segue to those buttons to present relevant view controllers?  Is it possible to create those segues in advance in Xcode?

Thanks,

Shimin
0 Kudos
1 Solution

Accepted Solutions
ShiminCai
Occasional Contributor III
Hi Dana,

Thanks a lot for your explanations which have made a lot of senses to me.

Cheers,

Shimin

View solution in original post

0 Kudos
2 Replies
DanaMaher
Occasional Contributor
Hi,

Is it possible to write apps like OnlineOfflineEditingSample, FeatureLayerEditingSample, etc using Xcode storyboard? In these apps the buttons on the navigation item are dynamically loaded/changed. Do I have to dynamically create and attach a segue to those buttons to present relevant view controllers?  Is it possible to create those segues in advance in Xcode?

Thanks,

Shimin


Yes, you can define segues that are attached to specific view controllers, but not a view element within the view controller, and then call the -(void)performSegue:withIdentifier: method of UIViewController. Thus, if you dynamically create and swap navigation items within a UIViewController, you can assign an action to each item that calls the appropriate segue.

Part 2 of this tutorial does a good job of explaining all the relevant details of segues in Storyboard.

Additionally, if you are building a complex project, learn to use multiple Storyboards in a single project. A single Storyboard works well, saves time, and makes your UI/UX clearer if you have a simple app that mostly pushes between Apple's default view classes and has a relatively linear progression. If you are building a more complicated app that has branched or non-linear workflow and incorporates custom view classes, a single Storyboard becomes a time suck and obfuscates your UI/UX flow.
0 Kudos
ShiminCai
Occasional Contributor III
Hi Dana,

Thanks a lot for your explanations which have made a lot of senses to me.

Cheers,

Shimin
0 Kudos