左スワイプ認識をテーブル ヘッダーのみに追加しようとしています。うまくいかないようです-stackoverflowとwebで見つかったすべてを試しました。実際の表のセルでは問題なく動作しますが、表のヘッダーに追加すると... 何もありません。
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{ スナップソング *song = nil;
NSString *テキスト = song.title; NSString *detailedText = song.albumName;
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, 80)];
view.backgroundColor = [[Globals sharedInstance] gCellBgColor];
view.tag = section;
UISwipeGestureRecognizer *recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self
action:@selector(handleSwipeLeft:)];
[recognizer setDirection:(UISwipeGestureRecognizerDirectionLeft)];
[view addGestureRecognizer:recognizer];
return view;
}
スワイプしないだけで、テーブルなどにジェスチャーを追加しようとしました...
助けてくれてありがとう