I have UIImageview as a subview of UIScrollview, I can zoom in or out by using this
tutorial http://cocoadevblog.heroku.com/iphone-tutorial-uiimage-with-zooming-tapping-rotation, the problem is how can I detect swipe gesture when I zoom UIScrollview in,
I know how to implement swipe gesture, and it work normally except when I zoom UIScrollview in.
Thank you very much for your time.
have a look at following links,hope it helps ..
How to implement zooming *and* paging like iOS Photos app
How to implement Swipe Gesture for UIImageView randomizer
Related
What gesture recogniser should I use if I want to the user to swipe between 2 UIView's in the same way they swipe between photos in the Photo app? No the zooming just the transition between 2 photos.
Should I use the swipe or the pan gesture?
I am also using this with the UIPageControl so that when they swipe the page changes and the new view is visible.
The answer is you use no gesture recogniser, instead you have to implement your own dragging method in scroll view delegate methods. Look at Apple's code they have written for this; http://developer.apple.com/library/ios/samplecode/PageControl/PageControl.zip
I think It would be better to use swipe gesture recognizer.I have used same way with UIPagecontrol and its working smoothly.
I have transparent UIImageView and UIScrollView under it , I want the UIImageView to recognize and process swipe gesture right and left , and pass the scroll up an down to the UIScrollView
How can I do it?
I added the swipe gestures to the image view and handle them, but I didn't find a way to pass the scrolling from the UIImage to UIScroll
You could could set the userInteractionEnabled property of the scroll view to NO and add several gesture recognizers to handle the different events (horizontal and vertical scrolling).
I created custom UIScrollView and add UIImageView.
I want to detect horizontal swipe gesture on the UIScrollView, but I cannot do it.
I cannot find any other references in my case.
I found only following url, but it's not real detecting gesture.
How to recognize swipe gesture in UIScrollView
I've not any zoom effect.
Please help me.
Doesn't one of the UIScrollViewDelegate methods such as [UIScrollViewDelegate scrollViewDidScroll:] work for you? I don't know your specific case, but standard way of detecting swipe action in UIScrollView should be through its delegate.
I have a UIScrollView and an UIImageView as its subview. I want to draw on the imageview in response to the single touches. And I want to zoom and pan the image view in the scroll view on pinch and pan gestures respectively. I found many solutions. But its not perfect. Please give me a straight forward solution.
use after subclassing UIScrollview.See the link.If you are doing application for iphone4 OS,try to use UIGestureRecogniser.see the sample code for it in Apple site.
If you are only using the scrollview for panning and zooming, I would suggest subclassing UIImageView to provide that functionality yourself along with the drawing. This will allow you to have finer control over it and quicker code. A scrollview is not very good at allowing complex gestures within it. (other than taps)
I want to rotate an UIView using CGAffineTransform and I'm able to rotate View using CGAffineTransform.
But I want to rotate UIView smoothly on finger touch based on swipe gestures.
So like right swipe, left swipe I was able to detect swipe but when I swipe from down to right or from down to left, I'm not able to detect swipe gesture of these types...
Sanjay these are the only allowable gestures that a iPhone supports
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UISwipeGestureRecognizer_Class/Reference/Reference.html#//apple_ref/occ/instp/UISwipeGestureRecognizer/direction
so I think you are trying to recognize a diagonal swipe gesture and the its not working.
and also there is a minimum numberOfTouchesRequired required for swipe gesture.
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UISwipeGestureRecognizer_Class/Reference/Reference.html#//apple_ref/occ/cl/UISwipeGestureRecognizer
And if you want to rotate a UIView object than I think you will find the code in this link
rotating a view on touch
Hope this helps.