
Xcodeを使用して「ユーティリティアプリケーション」を構築しています。上記は、メインのViewControllerからめくったときに表示されるビューのスクリーンショットです。このビューのUITableView内部では、デリゲートとソースUIViewControllerが含まれているビューに対してに設定されており、テーブルデータは適切に入力されます(uiviewcontrollerデータソースとして正しく動作することを意味します)が、テーブルはどのイベントにも応答しません。つまり、デリゲートメソッドは応答しません。テーブルのために呼び出されます。テーブルの行を選択することすらできません。
これに関するどんな助けも本当にありがたいです。
はい、userInteractionEnabledはYESに設定されています。セルを生成するためのコードもここにあります
-(UITableViewCell *)populateFeatureCell:(UITableView *)tableView row:(NSUInteger)row {
NSString *CellIdentifier = @"FeatureCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
SKProduct *product = [STLNavigatorIAPHelper productAtIndex:row];
if (product != nil) {
cell.textLabel.text = [product localizedTitle];
UIButton *buyButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
buyButton.frame = CGRectMake(0, 0, 72, 37);
[buyButton setTitle:NSLocalizedString(@"BUY", nil) forState:UIControlStateNormal];
buyButton.tag = row;
[buyButton addTarget:self action:@selector(buyButtonTapped:) forControlEvents:UIControlEventTouchUpInside];
cell.accessoryType = UITableViewCellAccessoryNone;
cell.accessoryView = buyButton;
}
[cell setUserInteractionEnabled:YES];
return cell;
}