开发者

Delegate of UIScrollView / Subviews

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 (View1Controll开发者_运维知识库er) --> Including the button which should control the UIScrollView
---- UIView (View2Controller)
}

Thanks in advance!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜