public static UIViewController FromProfile (TTTProfile profile, string profilePath)
		{
			TTTMessagesViewController controller = new TTTMessagesViewController ();
			controller.profile = profile;
			UINavigationController navController = new UINavigationController (controller);
			return navController;
		}
예제 #2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            UINavigationBar.Appearance.SetBackgroundImage(
                UIImage.FromBundle("navigationBarBackground"), UIBarMetrics.Default);
            UINavigationBar.Appearance.SetTitleTextAttributes(
                new UITextAttributes()
            {
                TextColor = UIColor.Black
            });
            profile = loadProfileWithPath(profilePath);

            window = new UIWindow(UIScreen.MainScreen.Bounds);
            UIViewController   viewController1  = TTTPlayViewController.FromProfile(profile, profilePath);
            UIViewController   viewController2  = TTTMessagesViewController.FromProfile(profile, profilePath);
            UIViewController   viewController3  = TTTProfileViewController.FromProfile(profile, profilePath);
            UITabBarController tabBarController = new UITabBarController();

            tabBarController.TabBar.BackgroundImage = UIImage.FromBundle("barBackground");
            tabBarController.ViewControllers        = new [] {
                viewController1,
                viewController2,
                viewController3
            };
            window.RootViewController = tabBarController;

            updateTintColor();

            window.MakeKeyAndVisible();

            NSNotificationCenter.DefaultCenter.AddObserver(TTTProfile.IconDidChangeNotification,
                                                           iconDidChange);

            return(true);
        }
        public static UIViewController FromProfile(TTTProfile profile, string profilePath)
        {
            TTTMessagesViewController controller = new TTTMessagesViewController();

            controller.Profile = profile;
            UINavigationController navController = new UINavigationController(controller);

            return(navController);
        }