Saturday, December 21, 2013

UITableView how to respond to touch events?

I use open source AQGridView, somewhat similar to the behavior of UITableView.
I need this behavior: When the touch screen (currently Gridview) when you can do some operations.
But can not seem to find GridviewController not respond touchBegan, such functions touchMoved (UITableViewController also)

What to do in order to capture the GridView / UITableView touch event? ?
Reply:
There are no visible view cover it?
Reply:
cited a floor ybh37 reply:
an invisible view cover it?

Invisible View coverage? What does this mean?

Such realization will pop up like this when a control bar at the top of the touch function when girdview
Reply:
VIEW is not visible at the top of the stack is set with a view but invisible, you actually operating this view
Reply:
Then perhaps AQGridView and tableview in achieving some differences on the touch event, you can check some information to see, it should not be a problem
Reply:
reference to the third floor zhou4570 reply:
VIEW is not visible at the top of the stack is set to have a view, but not visible, you operate actually this view

But I actually want to operate the GridView, for example, to know which format to touch ..
Reply:
You mean not respond to touch events GridView touch it?
Reply:
reference to the 6th floor zhou4570 reply:
you mean not respond to touch events GridView touch it?

Ah, that is, those touchBegan in GridViewController in writing: withEvent, touchMoved: withEvent can not be executed.
Tried it, in the same UITableViewController.
Reply:
Put your code stickers look
Reply:
I do not know how to write your GridView is, we have customized a similar thing, is inherited from UIView, on top of some button, and then handle button events


Oh, this approach is a bit rotten
Reply:
reference to the 8th floor zhou4570 reply:
put your code stickers look

 @ interface GridViewController: AQGridViewController {
NSArray * imageCells;
}


Then write in the implementation file several touch events
 # import "GridViewController.h" 
@ Implementation GridViewController

- (Void) touchesBegan: (NSSet *) touches withEvent: (UIEvent *) event
{
NSLog (@ "touchBegan");
}

- (Void) touchesMoved: (NSSet *) touches withEvent: (UIEvent *) event
{
NSLog (@ "touchMoved");
}

Reply:
But each cell subclasses of the class is the response touchBegan and touchMoved
Reply:
reference to the 9th floor zzxxdd reply:
GridView is you do not know how to write, we have customized a similar thing, is inherited from UIView , on top of some button, and then deal with button event


Oh, this approach is a bit rotten

Because to do is similar to the iPad's photo browser that kind of stuff. If the picture is very much your own UIView it difficult to deal with ..
Reply:
I dare [MyView isTouchEnable: YES] Can write?
Reply:
Upstairs head

Reply:
reference to the 13th floor king131488 reply:
dare [MyView isTouchEnable: YES] Can write?


Such a function? Wrote, but did not prompt such functions ....
Reply:
AQGridViewDelegate

- (Void) gridView: (AQGridView *) gridView didSelectItemAtIndex: (NSUInteger) index;
Reply:
reference to the 16th floor darkdong reply:
AQGridViewDelegate

- (Void) gridView: (AQGridView *) gridView didSelectItemAtIndex: (NSUInteger) index;


Should control their own delegate, because they delegate integrated performance and behavior control.
Reply:
reference to the 16th floor darkdong reply:
AQGridViewDelegate

- (Void) gridView: (AQGridView *) gridView didSelectItemAtIndex: (NSUInteger) index;

This is only when you select an execution only when, that is, when the touch and release the hand will respond. But what I need is a touch of the hand when the response.
Reply:
cited 17 floor arthersophy reply:
reference to the 16th floor darkdong reply:

AQGridViewDelegate

- (Void) gridView: (AQGridView *) gridView didSelectItemAtIndex: (NSUInteger) index;


Should control their own delegate, because they delegate integrated performance and behavior control.


In its own delegate in no touchesBegan, touchesMoved such behavior. Only selected, these acts will be selected ...
I should not write your own, then put them in the AQGridView spread out?
Reply:
It is estimated that only rewrite AQGridView in the touchesBegan, touchesMoved these methods of

No comments:

Post a Comment