Apple is really funny. I mean, they say that this works:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch* touch = [touches any
Today I found a better method to fix this or the question like this.
In yours UITableViewCell,you can add a delegate to listen the touch event, like this:
@protocol imageViewTouchDelegate
-(void)selectedFacialView:(NSInteger)row item:(NSInteger)rowIndex;
@end
@property(nonatomic,assign)iddelegate;
Then in yours UITableViewController:your can done like this:
@interface pressionTable : UITableViewController
and in the .m file you can implemate this delegate interface,like:
-(void)selectedFacialView:(NSInteger)row item:(NSInteger)rowIndex{
//TO DO WHAT YOU WANT}
NOTE:when you init the cell,you must set the delegate,otherwise the delegate is invalid,you can do like this
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
pressionCell *cell = (pressionCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[pressionCell alloc]initWithFrame:CGRectMake(0, 0, 240, 40)];
}
cell.delegate = self;
}
PS:I know this DOC is old, but I still add my method to fix the question so when people meet the same problem, they will get help from my answer.