Open n00neimp0rtant opened 10 years ago
I have the same setup, and same crashing.
I found out what the issue is with this. You can reproduce this by zooming into the image, rotating the device, and then panning the image. What you need to do is on autorotateDidFinish, zoom the image out.
Placing a UIScrollView
into SwipeView directly would cause this problem. To solve the issue, use a normal UIView and add the scroll view to that view. This way SwipView's scroll event won't mess up with your own scroll view's.
Here's where it keeps getting looped:
So here's my setup: I need a horizontal swipe view with images as each item in the swipe view, but each image should be zoomable on it's own. I take a UIImageView, place it into a UIScrollView, make the scroll view zoomable by setting the scale properties and delegate, then place the scroll view as an item in the swipe view. I can swipe through them and zoom as expected. If I zoom in then use a single finger to swipe across the image, my own scroll view grabs the touch event and allows me to pan around the image (this is expected/desired behavior!), but if I reach the edge of the image where it should start rubberbanding, the app instantly locks up and Xcode informs me of that infinite loop.
It should be noted that my scroll view (the zoomable, pannable one that is acting as an item for the swipe view) is a UIScrollView subclass that has its delegate set to itself. Not sure if this has anything to do with the issue, but I figured it was worth mentioning.