segue 获得UITableViewCell

来源:互联网 发布:ppt淘宝宝贝属性怎么填 编辑:程序博客网 时间:2024/06/15 12:06
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {    // Get the new view controller using [segue destinationViewController].    // Pass the selected object to the new view controller.    STViewController * demoVC = [segue destinationViewController];    UITableViewCell * cell  = sender;    NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];    demoVC.type             = (STControllerType)[_dataSource[indexPath.row][@"type"] integerValue];    demoVC.title            = _dataSource[indexPath.row][@"title"];    [super prepareForSegue:segue sender:sender];    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];}

0 0