0

I have a UIscrollview that takes up about half of a screen. The scrollview contains a series of view controllers that have buttons that have segues to another view controller. When that segue is followed, it loads the view controller on top of the current scrollview.

I want that new view controller to act like any other modal segue would act if the button was not within a subview or scrollview. In other words, take up the whole screen.

Can you use segues from within a subview or a scrollview?

Thanks!

user1146403
  • 139
  • 1
  • 12

2 Answers2

0

The scrollview contains a series of view controllers that have buttons that have segues to another view controller.

An instance of UIScrollView can't "contain" view controllers -- it can only contain other views. It might contain views that are managed by other view controllers, but if you're using many view controllers all at the same time you may want to read Am I abusing UIViewController Subclassing?.

Community
  • 1
  • 1
Caleb
  • 124,013
  • 19
  • 183
  • 272
  • Bad semantics, I have views added to the scrollview. But, that doesn't solve the problem of ensuring that that the view controller / view is contained within the scrollview, not taking over the whole screen. – user1146403 Mar 27 '12 at 23:50
0

I ended up just using delegates and protocols between the views in the scrollview and the parent view controller and then I launch the new view from the parent view controller. Seems to be doing the trick.

user1146403
  • 139
  • 1
  • 12