当前位置: 首页>>代码示例>>C#>>正文


C# UINavigationController类代码示例

本文整理汇总了C#中UINavigationController的典型用法代码示例。如果您正苦于以下问题:C# UINavigationController类的具体用法?C# UINavigationController怎么用?C# UINavigationController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


UINavigationController类属于命名空间,在下文中一共展示了UINavigationController类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendSms

 public static void SendSms(UINavigationController navigation)
 {
     UIView.BeginAnimations(null,IntPtr.Zero);
     UIView.SetAnimationDuration(0.4);
     UIView.SetAnimationTransition(UIViewAnimationTransition.FlipFromRight, navigation.View, true);
     UIView.CommitAnimations();
 }
开发者ID:zekiller3,项目名称:SMSParty,代码行数:7,代码来源:TransitionManager.cs

示例2: FinishedLaunching

		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			// create a new window instance based on the screen size
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			
			// make the window visible
			window.MakeKeyAndVisible ();
			
			// create our nav controller
			navController = new UINavigationController ();

			// create our home controller based on the device
			if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) {
				homeViewController = new Tasky.Screens.iPhone.Home.controller_iPhone();
			} else {
//				homeViewController = new Hello_UniversalViewController ("Hello_UniversalViewController_iPad", null);
			}
			
			// Styling
			UINavigationBar.Appearance.TintColor = UIColor.FromRGB (38, 117 ,255); // nice blue
			UITextAttributes ta = new UITextAttributes();
			ta.Font = UIFont.FromName ("AmericanTypewriter-Bold", 0f);
			UINavigationBar.Appearance.SetTitleTextAttributes(ta);
			ta.Font = UIFont.FromName ("AmericanTypewriter", 0f);
			UIBarButtonItem.Appearance.SetTitleTextAttributes(ta, UIControlState.Normal);
			

			// push the view controller onto the nav controller and show the window
			navController.PushViewController(homeViewController, false);
			window.RootViewController = navController;
			window.MakeKeyAndVisible ();
			
			return true;
		}
开发者ID:BeardAnnihilator,项目名称:xamarin-samples,代码行数:34,代码来源:AppDelegate.cs

示例3: FinishedLaunching

		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			// create our window
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			window.MakeKeyAndVisible ();
			
			// are we running an iPhone or an iPad?
			DetermineCurrentDevice ();

			// instantiate our main navigatin controller and add it's view to the window
			mainNavController = new UINavigationController ();
			
			switch (CurrentDevice)
			{
				case DeviceType.iPhone:
					iPhoneHome = new HandlingRotation.Screens.iPhone.Home.HomeScreen ();
					mainNavController.PushViewController (iPhoneHome, false);
					break;
				
				case DeviceType.iPad:
					iPadHome = new HandlingRotation.Screens.iPad.Home.HomeScreenPad ();
					mainNavController.PushViewController (iPadHome, false);
					break;
			}

			window.RootViewController = mainNavController;

			return true;
		}
开发者ID:7sharp9,项目名称:monotouch-samples,代码行数:29,代码来源:AppDelegate.cs

示例4: FinishedLaunching

		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			// create a new window instance based on the screen size
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			
			// make the window visible
			window.MakeKeyAndVisible ();
			
			// create our nav controller
			navController = new UINavigationController ();

			// create our home controller based on the device
			if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) {
				homeViewController = new Screens.HomeScreen();
			} else {
// sample does not contain an iPad UI
//				homeViewController = new Screens.iPadHomeScreen ();
			}
			
			// push the view controller onto the nav controller and show the window
			navController.PushViewController(homeViewController, false);
			window.RootViewController = navController;
			window.MakeKeyAndVisible ();
			
			return true;
		}
开发者ID:BeardAnnihilator,项目名称:xamarin-samples,代码行数:26,代码来源:AppDelegate.cs

示例5: TimelineViewController

		public TimelineViewController (FilterType filterType, bool pushing, UINavigationController msp, 
		                               IMapLocationRequest maplocationRequest) 
			: base(pushing)
		{
			_FilterType = filterType;
			_MapLocationRequest = maplocationRequest;
			
			ShowLoadMorePhotos = true;

			this.TableView.SeparatorStyle = UITableViewCellSeparatorStyle.None;
			this.TableView.BackgroundColor = new UIColor (226f, 231f, 237f, 1f);
			this.TableView.AllowsSelection = false;

			switch(filterType)
			{
				case FilterType.Friends:
					TableView.BackgroundView = new UIImageView(Graphics.GetImgResource("fond1"));
					break;
				case FilterType.Recent:
					TableView.BackgroundView = new UIImageView(Graphics.GetImgResource("fond2"));
					break;
				case FilterType.All:
					TableView.BackgroundView = new UIImageView(Graphics.GetImgResource("fond3"));
					break;
			}

			_list = new List<ImageInfo>();
			_MSP = msp;
			
			OnGestSwipe += HandleOnSwipe;
		}
开发者ID:21Off,项目名称:21Off,代码行数:31,代码来源:Timeline.cs

示例6: FinishedLaunching

        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            viewController = new UINavigationController ();
            viewController.PushViewController(new MainScreenGroup(), true);
            viewController.NavigationBar.Opaque = true;

            window.MakeKeyAndVisible ();

            #if LITE
            AdManager.LoadBanner();
            #endif

            // On iOS5 we use the new window.RootViewController, on older versions, we add the subview
            if (UIDevice.CurrentDevice.CheckSystemVersion (5, 0))
                window.RootViewController = viewController;
            else
                window.AddSubview (viewController.View);

            #if LITE
            Apprater = new Appirater(527002436);
            #else
            Apprater = new Appirater(526844540);
            #endif
            Apprater.AppLaunched();
            return true;
        }
开发者ID:zekiller3,项目名称:SMSParty,代码行数:35,代码来源:AppDelegate.cs

示例7: FinishedLaunching

		//
		// This method is invoked when the application has loaded and is ready to run. In this
		// method you should instantiate the window, load the UI into it and then make the window
		// visible.
		//
		// You have 17 seconds to return from this method, or iOS will terminate your application.
		//
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			// create a new window instance based on the screen size
			window = new UIWindow (UIScreen.MainScreen.Bounds);

			var web = new WebElement ();
			web.HtmlFile = "instructions";

			var root = new RootElement ("Kannada Keyboard") {
				new Section{
					new UIViewElement("Instruction", web.View, false)
				}
			};
		
			var dv = new DialogViewController (root) {
				Autorotate = true
			};
			var navigation = new UINavigationController ();
			navigation.PushViewController (dv, true);				

			window = new UIWindow (UIScreen.MainScreen.Bounds);
			window.MakeKeyAndVisible ();
			window.AddSubview (navigation.View);
			
			return true;
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:33,代码来源:AppDelegate.cs

示例8: BigItemMasterView

        public BigItemMasterView()
            : base()
        {
            masterView = new BigItemsScreen();
            detailview = new BigItemDetailScreen();

            masterView.ActivateDetail += (object sender, BigItemDetailClickedEventArgs e) => detailview.ShowDetails (e.lagerobject);

            detailview.BigItemSaved += (object sender, BigItemSavedEventArgs e) => masterView.Refresh ();

            //			detailview.Derezzy += (object sender, DerezLargeObjectEventArgs e) => {
            //                detailnav.PopViewControllerAnimated(true);
            //                masterView.Refresh();
            //            };

            detailview.GotPicture += (object sender, GotPictureEventArgs e) => masterView.Refresh ();

            masternav = new UINavigationController();
            masternav.PushViewController(masterView, false);

            detailnav = new UINavigationController();
            detailnav.PushViewController(detailview, false);

            //always last
            ViewControllers = new UIViewController[] {masternav, detailnav};
        }
开发者ID:Skalar,项目名称:Indexer,代码行数:26,代码来源:BigItemMasterView.cs

示例9: FinishedLaunching

        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            UINavigationBar.Appearance.TintColor = UIColor.FromRGB (29, 131, 219);

            window = new UIWindow (UIScreen.MainScreen.Bounds);
            window.BackgroundColor = UIColor.White;
            window.Bounds = UIScreen.MainScreen.Bounds;

            var u = new TaskListScreen();
            navController = new UINavigationController();
            navController.PushViewController (u, false);

            window.RootViewController = navController;
            window.MakeKeyAndVisible ();

            // DROPBOX STUFF
            // The account manager stores all the account info. Create this when your app launches
            var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret);
            DBAccountManager.SharedManager = manager;

            var account = manager.LinkedAccount;
            if (account != null) {
                SetupDropbox ();
            } else
                manager.LinkFromController (window.RootViewController);
            //--

            return true;
        }
开发者ID:AranHu,项目名称:TaskCloud,代码行数:29,代码来源:AppDelegate.cs

示例10: FinishedLaunching

		//
		// This method is invoked when the application has loaded and is ready to run. In this
		// method you should instantiate the window, load the UI into it and then make the window
		// visible.
		//
		// You have 17 seconds to return from this method, or iOS will terminate your application.
		//
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			window = new UIWindow (UIScreen.MainScreen.Bounds);

			// We use NSUserDefaults to store a bool value if we are tracking the user or not 
			var optionsDict = NSDictionary.FromObjectAndKey (new NSString ("YES"), new NSString (AllowTrackingKey));
			NSUserDefaults.StandardUserDefaults.RegisterDefaults (optionsDict);

			// User must be able to opt out of tracking
			GAI.SharedInstance.OptOut = !NSUserDefaults.StandardUserDefaults.BoolForKey (AllowTrackingKey);

			// Initialize Google Analytics with a 5-second dispatch interval (Use a higher value when in production). There is a
			// tradeoff between battery usage and timely dispatch.
			GAI.SharedInstance.DispatchInterval = 5;
			GAI.SharedInstance.TrackUncaughtExceptions = true;

			Tracker = GAI.SharedInstance.GetTracker ("CuteAnimals", TrackingId);

			viewController = new DVCMenu ();
			navController = new UINavigationController (viewController);
			window.RootViewController = navController;
			window.MakeKeyAndVisible ();
			
			return true;
		}
开发者ID:Ontropix,项目名称:onliner-reader,代码行数:32,代码来源:AppDelegate.cs

示例11: FinishedLaunching

        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            try
            {
                window = new UIWindow(UIScreen.MainScreen.Bounds);

                SettingsMobile.Instance.User = new SqlFactory().CreateTables().GetProfile();
                if (SettingsMobile.Instance.User == null)
                    SettingsMobile.Instance.User = new Portable.Account.UserMobile();

                if (SettingsMobile.Instance.User.LastMobileLoginDate.AddDays(30) > DateTime.UtcNow)
                    SettingsMobile.Instance.User.IsLoggedIn = false;

                viewController = new MainViewController();
                var rootNavigationController = new UINavigationController();
                rootNavigationController.PushViewController(viewController, false);
                window.RootViewController = rootNavigationController;

                window.MakeKeyAndVisible();
               
            }
            catch (Exception exception)
            {
                ErrorHandler.Save(exception, MobileTypeEnum.iPhone);
            }
            return true;
        }
开发者ID:mukhtiarlander,项目名称:git_demo_torit,代码行数:27,代码来源:AppDelegate.cs

示例12: OnCreateMenu

		/// <summary>
		/// Invoked when it comes time to set the root so the child classes can create their own menus
		/// </summary>
		private void OnCreateMenu(RootElement root)
		{
            var addGistSection = new Section();
            root.Add(addGistSection);
            addGistSection.Add(new MenuElement("New Gist", () => {
                var gistController = new CreateGistController();
                gistController.Created = (id) => {
                    NavigationController.PushViewController(new GistInfoController(id), true);
                };
                var navController = new UINavigationController(gistController);
                PresentViewController(navController, true, null);
            }, Images.Buttons.NewGist));

            var gistMenuSection = new Section() { HeaderView = new MenuSectionView("Gists") };
            root.Add(gistMenuSection);
            gistMenuSection.Add(new MenuElement("My Gists", () => NavigationController.PushViewController(new MyGistsController(), true), Images.Buttons.MyGists));
            gistMenuSection.Add(new MenuElement("Starred", () => NavigationController.PushViewController(new StarredGistsController(), true), Images.Buttons.Star2));
            gistMenuSection.Add(new MenuElement("Public", () => NavigationController.PushViewController(new PublicGistsController(), true), Images.Buttons.Public));

//            var labelSection = new Section() { HeaderView = new MenuSectionView("Tags") };
//            root.Add(labelSection);
//            labelSection.Add(new MenuElement("Add New Tag", () => { }, null));

            var moreSection = new Section() { HeaderView = new MenuSectionView("Info") };
            root.Add(moreSection);
            moreSection.Add(new MenuElement("About", () => NavigationController.PushViewController(new AboutController(), true), Images.Buttons.Info));
            moreSection.Add(new MenuElement("Feedback & Support", () => { 
                var config = UserVoice.UVConfig.Create("http://gistacular.uservoice.com", "lYY6AwnzrNKjHIkiiYbbqA", "9iLse96r8yki4ZKknfHKBlWcbZAH9g8yQWb9fuG4");
                UserVoice.UserVoice.PresentUserVoiceInterface(this, config);
            }, Images.Buttons.Feedback));
            moreSection.Add(new MenuElement("Logout", Logout, Images.Buttons.Logout));
		}
开发者ID:envy4s,项目名称:Gistacular,代码行数:35,代码来源:MenuController.cs

示例13: TabBar

        public TabBar(MXTouchContainer touchContainer)
        {
            Model = new Object();

            // define view size
            View.Frame = new RectangleF (0, 20, 320, 460);

            // setup view controllers for each tab
            var navBarTint = UIColor.FromRGB(0, 63, 107);
            var rootTabBarCtrls = new List<UIViewController>(3);

            var navCtrl = new UINavigationController();
            navCtrl.NavigationBar.TintColor = navBarTint;
            navCtrl.TabBarItem = new UITabBarItem("Contacts", UIImage.FromBundle("images/contacts.png"), 0);
            rootTabBarCtrls.Add(navCtrl);

            navCtrl = new UINavigationController();
            navCtrl.NavigationBar.TintColor = navBarTint;
            navCtrl.TabBarItem = new UITabBarItem("Calendar", UIImage.FromBundle("images/cal.png"), 0);
            rootTabBarCtrls.Add(navCtrl);

            navCtrl = new UINavigationController();
            navCtrl.NavigationBar.TintColor = navBarTint;
            navCtrl.TabBarItem = new UITabBarItem("Tasks", UIImage.FromBundle("images/filecab.png"), 0);
            rootTabBarCtrls.Add(navCtrl);

            SetViewControllers(rootTabBarCtrls.ToArray(), false);
            Delegate = new TabBarDelegate();
        }
开发者ID:benhorgen,项目名称:dotDialog,代码行数:29,代码来源:TabBarView.cs

示例14: FinishedLaunching

        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // Prevent screen lock
            app.IdleTimerDisabled = true;

            // Load settings
            var conn = NSUserDefaults.StandardUserDefaults.StringForKey("connType");
            var connType = conn == null ? ConnectionType.Registrar : (ConnectionType) Enum.Parse(typeof(ConnectionType), conn);
            var connString = NSUserDefaults.StandardUserDefaults.StringForKey("connString");

            // Init config controller
            var webController = new iOSWebViewController(connType, connString);

            // init the root controller
            var rootController = new UINavigationController();
            rootController.NavigationBarHidden = true;
            rootController.PushViewController(webController, false);

            // init the window, add the root controller
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            window.RootViewController = rootController;
            window.MakeKeyAndVisible();

            return true;
        }
开发者ID:vistaprint,项目名称:automobile,代码行数:32,代码来源:AppDelegate.cs

示例15: FinishedLaunching

        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            MainPageViewController viewController = new MainPageViewController();

            //---- instantiate a new navigation controller
            var rootNavigationController = new UINavigationController();

            //---- add the home screen to the navigation controller
            // (it'll be the top most screen)
            rootNavigationController.PushViewController(viewController, false);

            //---- set the root view controller on the window. the nav
            // controller will handle the rest
            this.window.RootViewController = rootNavigationController;
            this.window.MakeKeyAndVisible ();
            return true;

            // make the window visible
            window.MakeKeyAndVisible ();

            return true;
        }
开发者ID:shelgaerel,项目名称:ProgettoPilota-iOs,代码行数:32,代码来源:AppDelegate.cs


注:本文中的UINavigationController类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。