public override bool FinishedLaunching(UIApplication app, NSDictionary options) { #if DEBUG Xamarin.Calabash.Start(); #endif string rottenKey = NSBundle.MainBundle.ObjectForInfoDictionary("RottenTomatoesKey").ToString(); _service = new RottenTomatoesService (rottenKey); // _service = new MockService(); _window = new UIWindow (UIScreen.MainScreen.Bounds); _boxOfficeViewController = new BoxOfficeViewController (_service); _detailsViewController = new MovieDetailsViewController(_service); _navigationController = new UINavigationController(_boxOfficeViewController); _window.RootViewController = _navigationController; _window.MakeKeyAndVisible (); return true; }
private void OnMovieClicked(object sender, MovieEventArgs e) { _detailsViewController = _detailsViewController ?? new MovieDetailsViewController(_service); _detailsViewController.MovieId = e.Movie.id; NavigationController.PushViewController(_detailsViewController, true); }