Cory
Cory

Reputation: 2312

UIScrollView embedded in other UIScrollView

I have a scrollview that contains a UIImageView, with an additional UIScrollView and UIImageView.

enter image description here

What i’m trying to achieve is to pinch zoom and pan each scrollview independently. If the zoom or panning occur in UIScrollView#1, I would like the scrollView#2 to remain stationary (location relative to the window). Likewise when zooming or panning in scrollview#2, scrollview#1 will not move.

I tried adding UIScrollView#2 as a subview to UIScrollView#1, however this causes UIScrollView#2 to move

Upvotes: 0

Views: 72

Answers (1)

Adem Özgür
Adem Özgür

Reputation: 201

i think adding both scrollviews to a parent view will give you what you want. don't add scrollview#1 as a subview to scrollview#2.

Upvotes: 1

Related Questions