Mikhail Kuznetsov avatar Mikhail Kuznetsov committed a2085fb

detail page title;

Comments (0)

Files changed (2)


     IBOutlet UITableView *showsTable;
-@property (nonatomic, retain)NSNumber *detailId;
+@property (nonatomic, retain)NSIndexPath *detailPath;
 - (UIImage *)loadImage:(TvShow *)currentShow indexPath:(NSIndexPath *) indexPath;
 - (UIImage *)resizeImage:(UIImage *)image;


 @implementation ShowsListTableViewController
-@synthesize detailId;
+@synthesize detailPath;
 - (id)initWithStyle:(UITableViewStyle)style
 - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
-    self.detailId = [(TvShow *)[shows objectAtIndex:[indexPath row]] showId];
+    self.detailPath = indexPath;
     [self performSegueWithIdentifier:@"show_detail" sender:nil];
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
     if ([segue.identifier isEqualToString:@"show_detail"]) {
-        [(ShowDetailViewController *)segue.destinationViewController setShowId:detailId];
+        ShowDetailViewController *controller = (ShowDetailViewController *)segue.destinationViewController;
+        [controller setShowId:[(TvShow *)[shows objectAtIndex:[self.detailPath row]] showId]];
+        [controller.navigationItem setTitle:[(TvShow *)[shows objectAtIndex:[self.detailPath row]] enTitle]];
     else {
         [super prepareForSegue:segue sender:sender];
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.