問題: EXC_BAD_ACCESS を取得し続けます。NSZombieEnabled を開いた後、[FeatureCommentListViewController RespondsToSelector:]: 割り当て解除されたインスタンス 0x7c1dc30 にメッセージが送信されました。
プロジェクトを ARC に変更する前は、そのようなエラーはありませんでしたが、ARC に変更した後、このエラーが表示されました。
ViewController を Block で宣言し、それを Navigation Controller にプッシュします。この理由により、寿命が短くなりますか?
UIBlockButton はこの投稿からのものです
UIBlockButton *lbGood3 = [[UIBlockButton alloc] initWithFrame:CGRectMake(0, 0, First_Button_Width, [self getGoodRow2Height:productDetail]) ]; [lbGood3 handleControlEvent:UIControlEventTouchUpInside withBlock:^ { NSLog(@"%@", Label.text); ProductDetail *productDetail = [productDetailDict objectForKey:@"product"]; NSString *dp_id = [NSString stringWithFormat:@"%@-%@",productDetail.url_crc,productDetail.site_id]; FeatureCommentListViewController *cmtListController = [[FeatureCommentListViewController alloc] initWithNibName:@"FeatureCommentListViewController" bundle:nil]; cmtListController.title = Label.text; cmtListController.isReviewed=isReviewed; cmtListController.productDetail=productDetail; cmtListController.dp_id=dp_id; cmtListController.feature_name = @"&feature_good_id=2"; [self.navigationController pushViewController:cmtListController animated:YES]; }];
コントローラーをこのviewControllerのメンバーとして宣言するか、ブロックから宣言する必要がありますか?