我已經習慣切片tableView.If我點擊的tableview它總是indexpath 0傳遞給詳細信息視圖controller.If的正確indexpath我點擊第二排,但它indexpath通過總是傳遞0不順着接下去連續傳球總是節0
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
if ([segue.identifier isEqualToString:@"toNext"]) {
detailTableViewController *detailVC = [segue destinationViewController];
[detailVC setkMessageDict:(NSDictionary*)[nArray objectAtIndex:[self.mytableView indexPathForSelectedRow].section]];
}
代碼有什麼問題?
有幾個部分?也許你的意思是排不節。 – KudoCC
我有4段..總是返回0. @KudoCC –
@gagarwal你可以提供一些例子嗎? –