セルにラベルと画像を表示する sqldata ファイルをロードするテーブル ビューがあります。イメージとその他のデータを次の VC にロードしたいのですが、ログを取得してファイル時間を引き戻すことさえできないようで、プッシュする機会がありません。それはすべてプログラムで行われているため、見つけるのが少し難しくなります。すべての助けに感謝します!!!
//テーブルビュー
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath >*)indexPath { [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; ATPictureViewController *newView = [[ATPictureViewController alloc] init]; newView.mainImageView.image=[tableView >cellForRowAtIndexPath:indexPath].imageView.image ; [self.navigationController pushViewController:newView animated:YES]; // NSLog(@"Log33 %@",); } @end
これだと思った
newView.mainImageView.image=[tableView cellForRowAtIndexPath:indexPath].imageView.image;
でも何ももたらさない
//vc.h #import <UIKit/UIKit.h> @interface ATPictureViewController : UIViewController{ UIImageView *mainImage; } @property (strong, nonatomic) UIImageView *mainImageView; @end
ここで何かを呼び出すかどうかわからない
//vc.m - (void)viewDidLoad { [super viewDidLoad]; self.mainImageView = [[UIImageView alloc] initWithFrame:CGRectMake(50, 50, 200, 200)]; [self.view addSubview:self.mainImageView]; self.mainImageView.image = ???????????