Reputation: 1944
I have a UIScrollView where I have a button. I need that scrollview is blocked. (much larger than the screen) . To do this I did:
scrollView.userInteractionEnabled = NO;
but in doing so the button is not active.
there is a way to make it possible to interact with what's in the scrollview, but not to scroll?
thanks!
Upvotes: 1
Views: 1129
Reputation: 3411
You could change the contentSize of the scrollView to a size smaller than the screen of the device. Then, the OS won't scroll simply because it has no need to. So instead of disabling user interaction, just change the content size to smaller. Then, instead of re-enabling interaction, just change the content size back to larger.
Upvotes: 2