Hi,
I used
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)];
[self.view addGestureRecognizer:singleTap];
- (void)handleSingleTap:(UIGestureRecognizer *)gestureRecognizer {
UIView* view = gestureRecognizer.view;
CGPoint loc = [gestureRecognizer locationI...
This issue really has me stumped...
I have an iPad project that I use UIPanGestureRecognizer and I am using the following method call within my handlePanGesture:
- (AIEnemyUnit *) hitTestForEnemyUnit:(CGPoint)where {
CALayer * layer = [self hitTest:where];
while (layer) {
if ([layer isKindOfClass:[AIEnemyUnit class]]...
Is it possible to get a gesture start point from a UISwipeGestureRecognizer. like how its possible in
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch * touch = [touches anyObject];
gestureStartPoint = [touch locationInView:self];
}
...
I have a UIImageView, which I want to be able to resize and rotate etc.
Can a GestureRecognizer be added to the ImageView?
I would want to add a rotate and pinch recognizer to a UIImageView which would be created at runtime.
How does one add these recognizers?
Thanks
...
I have a UITableView with custom cells. Inside each cell is 2 views. Each view has a UIGestureRecognizer attached to handle tap events. When the view is tapped, I send a message to a UINavigationController to push a detail view. This scenario works fine until I actually scroll the table. After the table is scrolled, the app crashes when ...
I would like to be able to add a new UIImageView of a certain size which should have a few UIGestureRecognizers detecting touch on the UIImageView.
How does one subclass UIImageView or how would this be best achieved?
I want the user to be able to add UIImageViews as they want at runtime and then the gestureRecognizer will allow them ...
I have a UIPanGestureRecognizer I am using to track an object (UIImageView) below a user's finger. I only care about motion on the X axis, and if the touch strays above or below the object's frame on the Y axis I want to end the touch.
I've got everything I need for determining if a touch is within the object's Y bounds, but I don't kno...
I'm working on a drawing app.
I want the user to be able to "drop" a shape on the screen and then move, resize or rotate it as desired.
The problem is with the rotation. I have the moving and resizing working fine.
I did this before with a rather complex and memory/processor-intensive process, which I am now trying to improve.
I've ...
I'm developing an iPhone/iPad app that supports dragging items between table views. Since all the tables don't fit on screen, I've written a custom UIScrollView that lays them out horizontally, and supports paging.
While I've gotten the primary drag and drop together, there are a few remaining issues I can't get past.
After the user h...
I'm working on an iPad app that will use UIGestureRecognizers to allow the user to pan, scale and rotate objects (subclass of UIView) on the screen.
I understand that the [UIView frame] property isn't valid after a transform is done, so I'm trying to take the values of my UIGestureRecognizers and keep the "frame" myself.
Here's the cod...
Hi.
I have four UIImageViews lined up in a row and I want to be able to move the images from left to right. Is there a way to bound the movement to the x-axis (along the image centers) i.e. moving them only left and right? Similar to moving the icons around the screens on an iPhone.
I've added a UIPanGestureRecognizer to each of the ...
I'm creating an iOS user interface with a lot of different UIImageViews that will trigger actions when tapped (once is enough).
I have the choice between using UIButtons with a custom view (the image) or just setting up a bunch of UIImageviews with an associated UITapGestureRecognizers.
In terms of functionality I get the same expected r...
I'm currently having some conflicts with UIGestureRecognizers that is causing everything to place nice with each other. I have several squares (UIView) on the screen that let the user to pan and pinch (used to scale the views). I have a UIPinchGestureRecognizer added to the main view which the squares are added so that I can scale the ...
I have a UIPanGestureRecognizer on a view inside of a UIScrollView. Its function is to move its parent view around when panned. This works perfectly well at 1x and 2x zoom resolutions in the scroll view, but zooming in farther causes them to fail quite often - yet not always.
There is also a long press & double tap recognizer on the sam...