Ejemplo n.º 1
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method
            database = new MovieDbConnection();

            var movieApi = MovieDbFactory.Create <IApiMovieRequest>().Value;

            this.Window = new UIWindow(UIScreen.MainScreen.Bounds);
            var movieController           = new MovieSearchViewController(movieApi);
            var movieNavigationController = new UINavigationController(movieController);

            var topRatedController           = new TopRatedListController(movieApi);
            var topRatedNavigationController = new UINavigationController(topRatedController);

            var tabBarController = new TabBarController()
            {
                ViewControllers = new UIViewController[] { movieNavigationController, topRatedNavigationController } //TODO: Bæta við Collection
            };

            this.Window.RootViewController = tabBarController;
            this.Window.MakeKeyAndVisible();

            return(true);
        }
Ejemplo n.º 2
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // create a new window instance based on the screen size
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            var searchController    = new SearchController();
            var searchNavController = new UINavigationController(searchController);

            var topRatedController = new TopRatedListController();
            var topNavController   = new UINavigationController(topRatedController);

            var tabBarController = new TabBarController()
            {
                ViewControllers = new UIViewController[] { searchNavController, topNavController }
            };

            Window.RootViewController = tabBarController;

            // make the window visible
            Window.MakeKeyAndVisible();
            return(true);
        }