Question

I have a main menu with a list of buttons. On the bottom I have a bar that the user can flick up to the top via a scrollview. Whats underneath that bar however is a uiwebview. So when the user tries to scroll in the uiwebview, the bar and webview just snaps back down. Also, the uibuttons won't work when the bar is down because the scrollview is sitting over them. How do i make the scroll only work when the user touches the bar and make the buttons on my menu work when the bar is down?

Thanks in Advance!

Was it helpful?

Solution

Where you want the scrollView to "work" (maybe when user flicks the bar up) have the following code:

scrollView.userInteractionEnabled = YES;

and wherever you don't want the scrollView to register any user actions (like when the bar is down) just do the opposite and set it to NO.

OTHER TIPS

So if I understand correctly, you want the UIScrollView to respond to touches in only a certain part of the frame (the bar)?

I would suggest taking a look at one of my previous answers to a similar problem, here.

In particular, see:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top