0

ビューコントローラー間でこのデータを渡す方法をすべて試しましたが、どちらもページシートとしてモーダルに表されています。

ViewController 1.h で —————————</p>

@property (strong, nonatomic) NSMutableDictionary * updatableProduct ;
//@property (strong, nonatomic) NSDictionary * updatableProduct ; //tried

ViewController で 1 .m ——————————</p>

-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath     *)indexPath{

static NSString * cellIdentifier = @"Cell";
TailorOUCell  *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];

cell.updateOrder.tag = indexPath.row;
[cell.updateOrder addTarget:self action:@selector(nowUpdateOrder:) forControlEvents:UIControlEventTouchUpInside];

orderToUpdate = [orderQueryResults objectAtIndex:indexPath.row];

return cell;
}


-(void)nowUpdateOrder:(id)sender{

UIButton *senderButton = (UIButton *)sender;
updatableProduct = [orderQueryResults objectAtIndex:(long)senderButton.tag];

[self performSegueWithIdentifier:@"updateOrder" sender:updatableProduct];
//[self performSegueWithIdentifier:@"updateOrder" sender:self]; //tried

}


-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

if ([segue.identifier isEqualToString:@"updateOrder"]) {
    OUEditView * ouv = (OUEditView *)segue.destinationViewController;
    ouv.orderDetails = updatableProduct;
    [segue.destinationViewController setModalPresentationStyle:UIModalPresentationPageSheet];

}

}

ViewController 2 .h で —————————</p>

@property (strong, nonatomic) NSMutableDictionary * orderDetails ;

ViewController 2.m で —————————</p>

@synthesize orderDetails;

しかし、ログの orderDetails = null

どんな助けでも!

4

1 に答える 1