コード例 #1
0
 public override void ViewControllerSelected(UITabBarController tabBarController, UIViewController viewController)
 {
     if (viewController.GetType() == typeof(UINavigationController))
     {
         var tmp           = (UINavigationController)viewController;
         var navController = tmp.TopViewController;
         if (navController.GetType() == typeof(TopRatedMovieController))
         {
             TopRatedMovieController controller = (TopRatedMovieController)navController;
             controller.setReload(true);
         }
     }
 }
コード例 #2
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            this.Window = new UIWindow(UIScreen.MainScreen.Bounds);

            var movies = new FilmCollection();

            MovieDbFactory.RegisterSettings(movies);

            var movieController           = new ViewController(movies._movies);
            var movieNavigationController = new UINavigationController(movieController);

            var topRatedController           = new TopRatedMovieController(movies._movies);
            var topRatedNavigationController = new UINavigationController(topRatedController);

            var tabBarController = new TabBarController()
            {
                ViewControllers = new UINavigationController[] { movieNavigationController, topRatedNavigationController }
            };


            this.Window.RootViewController = tabBarController;
            this.Window.MakeKeyAndVisible();
            return(true);
        }
コード例 #3
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            this._searchMoviesHelper   = new MovieHelper();
            this._topRatedMoviesHelper = new MovieHelper();
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method
            this.Window = new UIWindow(UIScreen.MainScreen.Bounds);

            var movieController           = new MovieController(this._searchMoviesHelper);
            var movieNavigationController = new UINavigationController(movieController);

            var topRatedMovieController           = new TopRatedMovieController(this._topRatedMoviesHelper);
            var topRatedMovieNavigationController = new UINavigationController(topRatedMovieController);

            var tabBarController = new TabBarController()
            {
                ViewControllers = new UIViewController[] { movieNavigationController, topRatedMovieNavigationController }
            };

            this.Window.RootViewController = tabBarController;

            this.Window.MakeKeyAndVisible();
            return(true);
        }