私のUITableViewControllerは、SettingsViewControllerのクラス名を持っています。それはsignOutCellと呼ばれるUITableViewCellにリンクされたプロパティを含んでいます。私のUITableViewが私のUITableViewCellの中のTouchを認識しないのはなぜですか?
なぜ、ユーザーがsignOutCellに触れたことを認識しないのですか?それはSettingsViewController.mの中にありますか?
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
if ([touches containsObject:signOutCell])
{
[self triggerActionSheetConfirmation];
}
}
私は、if文の前に
NSLog(@"Received touch");
を置いたが、それは呼び出さやったことがなかったです。 touchesBegan:withEvent:このTableViewControllerで何かが触れられたとき、決して呼び出されませんか?
UITableViewCellで簡単なタップを取得して、メソッドtriggerActionSheetConfirmationを呼び出すにはどうすればよいですか?
ありがとうございます。私は複数のセクションを持っていたので、これは特に私の懸念に合っていました。これは私が使ったものです。 - (ボイド)のtableView:(のUITableView *)のtableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {IF([[のtableView indexPathForCell:signOutCell]のisEqual:indexPath]) {[自己triggerActionSheetConfirmation]。 } } – codeblooded