didSelectRowAtIndexPath が機能していません。
2 つのデリゲートを構成しましたか。すべてがリンクされています(テーブルビュー、テーブルビューセル)。
すでに削除され、再度実行されました。
ここですべてを検索しましたが、何も機能しませんでした。これは最高のリンク
の 1 つだったと思いますが、まだ役に立ちません。
私の最後の希望は、このテーブルビューがあるViewControllerをモーダル用に開いていることです。しかし、それは非常に間違った問題です。
それ以外に、私はいくつかの助けが必要です
Somo コード .H
@interface simulator : UIViewController <UITableViewDelegate, UITableViewDataSource, UIScrollViewDelegate>
{
NSArray *array_products;
}
@property (nonatomic, strong) NSDictionary *plist_products;
@property (nonatomic, strong) IBOutlet UITableView *table_menu_left;
@property (nonatomic, strong) NSString *file_plist;
@end
いくつかのコード.M
#import "cel_products.h"
- (void)viewDidLoad
{
NSString *path_root = [[NSBundle mainBundle] bundlePath];
NSString *full_path = [path_root stringByAppendingPathComponent:self.file_plist];
self.plist_products = [[NSDictionary alloc] initWithContentsOfFile:full_path];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"id_cell_products";
UITableViewCell *cell = [self.table_menu_left dequeueReusableCellWithIdentifier:CellIdentifier];
array_products = [self.plist_produtcs allKeys];
if (cell == nil)
{
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"cel_products" owner:self options:nil];
for(id currentObject in topLevelObjects)
{
if([currentObject isKindOfClass:[cel_products class]])
{
cell = (cel_products *)currentObject;
break;
}
}
}
cell.textLabel.text = [array_products objectAtIndex:indexPath.row];
return cell;
}
// numberofrowsinsection - OK
// numberofsectionintableviw - OK
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"Hein?????");
// Nothing..........
}