使用Storyboard进行界面跳转及传值
2018-03-12 本文已影响4人
UILabelkell
-
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
self.model = [self.dataSource objectAtIndex:indexPath.row];
[self performSegueWithIdentifier:@"DetailsVc" sender:@{@"taskid":self.model.taskid,@"titel":_model.taskname}];
} -
(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.destinationViewController isKindOfClass:[AssignmentDetailsVC class]]) {
AssignmentDetailsVC *vc = segue.destinationViewController;
vc.taskid = sender[@"taskid"];
vc.titeltext = sender[@"titel"];
}
NSLog(@"%s---%@",func,sender);
}