frkncngz
frkncngz

Reputation: 125

Turn off scrolling for a UIScrollView but keep zooming functionality

I have a UIScrollView and I want to turn off scrolling but I also want to keep the zooming functionality.

When I make scrollView.scrollEnabled = NO , it turns off scrolling but zooming is also gone.

Upvotes: 0

Views: 877

Answers (1)

fguchelaar
fguchelaar

Reputation: 4909

The documentation says:

When scrolling is disabled, the scroll view does not accept touch events; it forwards them up the responder chain.

You could try to set the UIScrollView's contentSize to it's bounds to effectively disable scrolling?

Upvotes: 1

Related Questions