views:

29

answers:

1

hi,

can you help me setting up a delegate for a UIScrollView, so I can interact with it from within it's subviews?

Following problem:

I added some UIViewControllers (with extra nibs) to a UIScrollView. I want to control the ScrollView from within those subviews. E.g. I want to disable scrolling when I press a button.

In another thread I read, that this can be done using delegates. I tried that based on a tutorial, but no chance... The controller structure is following:

BlaViewController
{
-- UIScrollView
---- UIView (View1Controller) --> Including the button which should control the UIScrollView
---- UIView (View2Controller)
}

Thanks in advance!

A: 

The way you guessed using delegates in correct. My guess is you're just not implementing it correctly. Have a look at Stanford iPhone Dev the 11th lecture to how to do it.

Rudiger