【发布时间】:2011-12-14 15:31:44
【问题描述】:
我正在尝试使用故事板 segue 而不是 didSelectRowAtIndex。
这是我有的,但是这个方法不能识别 indexPath.row。有没有其他方法可以用来做同样的事情?
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
SpecificExerciseTableViewController *upcomingViewController = segue.destinationViewController;
if ([segue.identifier isEqualToString:@"Web"])
{
upcomingViewController.exerciseArray = [[self.muscleArray objectAtIndex:indexPath.row]objectForKey:@"exercises"];
upcomingViewController.muscleName = [[self.muscleArray objectAtIndex:indexPath.row]objectForKey:@"muscleName"];
}
}
【问题讨论】:
标签: iphone objective-c cocoa-touch ios5 storyboard