本文整理汇总了C#中UINavigationController类的典型用法代码示例。如果您正苦于以下问题:C# UINavigationController类的具体用法?C# UINavigationController怎么用?C# UINavigationController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UINavigationController类属于命名空间,在下文中一共展示了UINavigationController类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: QCTest1Navigator
public QCTest1Navigator(UINavigationController navigationContext)
{
this.navigationContext = navigationContext;
// TODO: If your app requires multiple navigation contexts, add additional constructor parameters
// to pass them in, and then let the navigator manage when which context should be used.
// E.g. you could use this in a universal app running in PAD mode when you have a master view and a detail view on the same screen.
}
开发者ID:rvdplas,项目名称:QuickCross,代码行数:7,代码来源:QCTest1Navigator.cs
示例17: 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
MainWindow = new UIWindow(UIScreen.MainScreen.Bounds);
var currentHomeUiViewController = new SplashViewController();
RootNavigationController = new UINavigationController(currentHomeUiViewController);
MainWindow.RootViewController = RootNavigationController;
var titleTextAttributes = new UITextAttributes();
titleTextAttributes.TextColor = UIColor.FromRGB(25, 83, 135);
titleTextAttributes.TextShadowColor = UIColor.Clear;
titleTextAttributes.Font = UIFont.SystemFontOfSize(16);
// if (IsIOS5OrGreater)
// {
// UINavigationBar.Appearance.SetTitleTextAttributes(titleTextAttributes);
// UINavigationBar.Appearance.SetBackgroundImage(UIImage.FromBundle("/Images/top_bar_bg"), UIBarMetrics.Default);
// }
//
MainWindow.MakeKeyAndVisible();
return true;
}
开发者ID:mattkrebs,项目名称:RBAListDemo,代码行数:32,代码来源:AppDelegate.cs
示例18: GetViewer
public UIViewController GetViewer (object value, bool createInspector)
{
var vc = value as UIViewController;
if (vc != null)
return vc;
var sv = GetSpecialView (value);
vc = sv as UIViewController;
if (vc != null && vc.ParentViewController == null) {
return vc;
}
var v = sv as UIView;
if (v != null && v.Superview == null) {
vc = new UIViewController ();
vc.View = v;
return vc;
}
if (createInspector) {
vc = new UINavigationController (new ObjectInspector(value));
return vc;
}
return null;
}
开发者ID:praeclarum,项目名称:Continuous,代码行数:27,代码来源:Visualizer.iOS.cs
示例19: 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);
var root = new RootElement("MBProgressHUD")
{
new Section ("Samples")
{
new StringElement ("Simple indeterminate progress", ShowSimple),
new StringElement ("With label", ShowWithLabel),
new StringElement ("With details label", ShowWithDetailsLabel),
new StringElement ("Determinate mode", ShowWithLabelDeterminate),
new StringElement ("Annular determinate mode", ShowWIthLabelAnnularDeterminate),
new StringElement ("Custom view", ShowWithCustomView),
new StringElement ("Mode switching", ShowWithLabelMixed),
new StringElement ("Using handlers", ShowUsingHandlers),
new StringElement ("On Window", ShowOnWindow),
new StringElement ("NSURLConnection", ShowUrl),
new StringElement ("Dim background", ShowWithGradient),
new StringElement ("Text only", ShowTextOnly),
new StringElement ("Colored", ShowWithColor),
}
};
dvcDialog = new DialogViewController(UITableViewStyle.Grouped, root, false);
navController = new UINavigationController(dvcDialog);
window.RootViewController = navController;
window.MakeKeyAndVisible ();
return true;
}
开发者ID:JonathanTLH,项目名称:PanTiltZoomSystem,代码行数:39,代码来源:AppDelegate.cs
示例20: 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)
{
UITabBarController tabBarController;
window = new UIWindow (UIScreen.MainScreen.Bounds);
viewController = new Pubnub_MessagingMain ();
var dv = new Pubnub_MessagingMain () {
Autorotate = true
};
navigation = new UINavigationController ();
navigation.PushViewController (dv, true);
window = new UIWindow (UIScreen.MainScreen.Bounds);
window.MakeKeyAndVisible ();
window.RootViewController = navigation;
/* if (UIDevice.CurrentDevice.CheckSystemVersion (5, 0))
window.RootViewController = navigation;
else
window.AddSubview (navigation.View);*/
return true;
}
开发者ID:jdstroy,项目名称:c-sharp,代码行数:33,代码来源:AppDelegate.cs
注:本文中的UINavigationController类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论