Fixed displaying of selected city after showing all cities in MAPS.ME.

This commit is contained in:
Alex Zolotarev 2016-02-06 14:57:27 +03:00
parent 3e726956a7
commit 1425381157
3 changed files with 2 additions and 6 deletions

View file

@ -51,6 +51,7 @@
MasterViewController * masterVC = self.navigationController.viewControllers[0];
if (!masterVC.detailViewController)
masterVC.detailViewController = [[CityDetailViewController alloc] initWithNibName:@"CityDetailViewController" bundle:nil];
masterVC.detailViewController.city = masterVC.capitals[cityId];
masterVC.detailViewController.cityIndex = cityId;
[masterVC.navigationController pushViewController:masterVC.detailViewController animated:YES];
}

View file

@ -33,5 +33,6 @@
@interface MasterViewController : UITableViewController
@property (strong, nonatomic) CityDetailViewController * detailViewController;
@property (strong, nonatomic) NSArray * capitals;
@end

View file

@ -31,12 +31,6 @@
#import "MapsWithMeAPI.h"
@interface MasterViewController ()
@property (strong, nonatomic) NSArray * capitals;
@end
@implementation MasterViewController
- (CityDetailViewController *)detailViewController