ios - Moving between UIViewControllers without Segue -
i have storyboard has 8 uiviewcontroller
s 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
Post a Comment