ios - Moving between UIViewControllers without Segue -


i have storyboard has 8 uiviewcontrollers on (and counting). need able move between pair of these on demand. essentially, trying mimic functionality of uitabbarcontroller. since there many of these, can't use uitabbarcontroller (that solve problem immediately), using uipopovercontroller embedded uitableview allow user choose destination.

of course, create segues on storyboard, set of segues need currently, have create 56 such segues view controllers have right now, , potentially many more things grow.

one idea had create 'hub' view controller doesn't other hold segues each of 'real' vcs , delegate of each of vcs. then, when want switch between vcs, first dismiss view controller , pass segue name destination hub. hub can perform segue, gets me want. think work, seems sort of hackish.

does know how if there better way accomplish this? thank you!

why don't give each 1 storyboard identifier, grab need identifier using this:

uiviewcontroller *vc = [self.storyboard instantiateviewcontrollerwithidentifier:@"identifier"]; 

then present view controller via push or present modally


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -