Gesture recognizers with autolayout - ios

I have an app with some card swiping functionality. It seems that on small devices the gesture recognizer covers the correct area, but on iPhone 6 (and after applying a bunch of constraints) I can only swipe my cards from a small portion of them. I tried removing and adding the gesture recognizer to my views, I also tried re-creating the recognizer thinking that maybe once the views have been painted it would take the correct bounds,... but no success so far.
Any considerations in regards to this?

Related

iOS Pinch to zoom/rotate optimization for small items

I am playing with the pinching/dragging/rotating gestures (working with the gestures, not raw touch events). It works nice, but I have noticed one problem. For pinching/rotating both fingers need to be inside the view. As long as the view is large enough its not a problem, but as soon as the view becomes very small (in regards to the parent thats a scrollview), it feels a little bit like struggle to get the view "back". I have been checking some other apps, and Whatsapp does that the best. When you add a emoticon to an image inside Whatsapp, you can do all the gestures without the need to have both fingers on the view. For example, I made the emoticon really small, put two fingers so that the emoticon lies between them, and the gesture recognizer applies my movement to the emoticon (but not the to the scrollview which is the superview). When I do it inside my App the gestures are being applied to the scrollview as long as I dont place both fingers on the view I want to transform
Is there some setting on the gestures so it does that or do I have to work with raw touch events and calculate my own stuff ?
Thanks

ios paper app: swipe from off screen

I am studying Paper App from Fifty Three and find it very interesting the way they used for various gesture.
To differentiate the gesture from the PAN that they use for drawing, to turn the pages, you need to swipe from off the screen(as in outside of iPad screen) into the view to work.
How to implement that?
I don't have access to Paper's code, but I would guess they are using a UIPanGestureRecognizer only along the sides. Since the recognized 'captures' the touch, it wouldn't trigger their main drawing mechanism, but would catch only slides from offscreen - it might be only about 10-20pts wide.

Enlarging swipe angle in which a horizontal swipe is recognized in nested UITableView

I am trying to build a UI in iOS in which there is an outer paging UIScrollView inside of which are multiple UITableViews, each representing a page. The problem I am encountering is that the angle at which I must swipe to trigger the outer paging UIScrollView to scroll horizontally is too narrow. Here is a screenshot showing what I mean.
Essentially a user has to swipe at a near-perfect horizontal angle in order for the UITableView to ignore the gesture and pass it along to the outer UIScrollView, thereby triggering a horizontal page movement. This behavior quickly becomes annoying.
I have done extensive research on stack, to no avail. Some people suggest setting directionalLockEnabled, but that has no effect here (the inner UITableView has its direction locked, it's just too greedy with the angles it interprets as going in its direction). Others suggest modifications to the contentSize, but the contentSize of the views is, in point of fact, correct. Still others suggest using Gesture Recognizers, but those seem to have a delay before they kick in.
Can anyone suggest how to accomplish the behavior in the image above?

How to implement multiple simultaneous custom gestures in IOS?

Hi! My problem is not how to implement multiple custom gesture but how to handle multiple Custom Gestures. I have added a pinch custom gesture on corner points of the view and one finger rotation gesture on the view. For pinch custom gesture on corner points, I've used SPUserResizableView and for one finger custom gesture, I've used KTOneFingerRotationGestureRecognizer. But only one gesture is working. How can I resolve this? I've even tried using SPUserResizableView and default rotation gesture and it's not working. What may be the issue? Thank You.
may this links can help you. Simultaneous gesture recognizers in Iphone SDK
https://stackoverflow.com/questions/3160489/handle-tap-gesture-with-an-argument-iphone-ipad
Check it out it's all about gestures ,you doesn't need to use KTOneFingerRotationGestureRecognizer and SPUserResizableView.
You don't really need to use SPUserResizableView to handle the pinch gesture in the corners. You could probably get away with transparent subviews created programmatically, with the pinch gesture recognizer added to them.

UIscrollView swipe gesture + UIButton finger down effect on iOS

I'm trying to come up with a UISCrollView in paging mode, where each page shows an image of a product and, besides being able to swipe between pages, I'd also like for the product image to switch to a "down" version of it when a specific product/page is tapped.
So far I tried the following:
1 - adding UIButtons as the pages of the scrollview: obviously, this way I can have the images switch to their "Selected" version on finger down, but the buttons, taking up the whole page, prevent the scrollview from detecting the swipe gesture.
2 - adding UIVIews instead of buttons, and an UITapGestureRecognizer: this way I can tap an image to select a product and the recognizer also lets the gesture pass on to the scrollview, allowing for swiping too. But the problem with this approach is that I can't switch images to their "selected" versions when the user touches them, since the tap recognizer only reports UIGestureRecognizerStateEnded.
Any ideas as to how to get both the button up/down and scrollview swipe behaviors?
Scrap everything (well not everything, but you get the gist). No gesture recognizers no nothing. I recently had this problem too, having mounted a UIView on a UIScrollview that needed to have some interactive elements in it. The solution, UIView's friggin awesome property called exclusiveTouch. Exclusive touch takes all of the events from the scrollview, and ignores them if the event is inside the UIView, then passes them directly to your view. And because UIButton inherits from UIView, all you need is self.button.exclusiveTouch = YES
Pretty cool, huh!?

Resources