. ios6, , , . .
:
NavigationController → UIViewController ( PageControl, , ) → UITableViewController ( ), , DetailsViewController ( UIViewController).
prepareForSegue:
if ([[segue identifier] isEqualToString:@"ShowTelegrafDetails"]){
TelegrafDetailsViewController *details = (TelegrafDetailsViewController*)segue.destinationViewController;
NSIndexPath *myIndexPath = [self.tableView indexPathForSelectedRow];
if([self isItPad])
details.linkFromTableView = [[otherNews objectAtIndex:myIndexPath.row] link];
else
details.linkFromTableView = [[[myViewController.itemMatrix objectAtIndex:[self calculateCurrentPage]] objectAtIndex:myIndexPath.row] link];
NSLog(@"%@",segue.sourceViewController);
NSLog(@"%@",segue.destinationViewController);
[self.myViewController.navigationController pushViewController:details animated:YES];
}
, , , , NavigationController . , RootViewController - , AppDelegate, , root (UITableViewController).
- - , , . , , .
, - , , .: D
Thanx .
EDIT:
I managed to solve this problem. Just remove the segues and put the code from prepareForSegue in didSelectRowAtIndexPath with the corresponding fixes. This is not an ideal solution, but fixes the problem. Although, I have plans to support 4.3+ devices, and storyboards in this case are not an option.
In addition, I double-checked the code, found out that the RootViewController is correctly created and displayed, the NavigationController works well, and I still can not understand why segues do not work.
Greetings.
source
share