ios-samples/Tabbed_Images/FirstViewController.cs

50 строки
1.2 KiB
C#

using UIKit;
using CoreGraphics;
using System;
using Foundation;
namespace Tabbed_Images
{
public partial class FirstViewController : UIViewController
{
public FirstViewController (string nibName, NSBundle bundle) : base (nibName, bundle)
{
this.Title = NSBundle.MainBundle.LocalizedString ("First", "First");
this.TabBarItem.Image = UIImage.FromBundle ("Images/first");
}
public override void DidReceiveMemoryWarning ()
{
// Releases the view if it doesn't have a superview.
base.DidReceiveMemoryWarning ();
// Release any cached data, images, etc that aren't in use.
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
//any additional setup after loading the view, typically from a nib.
}
public override void ViewDidUnload ()
{
base.ViewDidUnload ();
// Release any retained subviews of the main view.
// e.g. this.myOutlet = null;
}
public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
{
// Return true for supported orientations
if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) {
return (toInterfaceOrientation != UIInterfaceOrientation.PortraitUpsideDown);
} else {
return true;
}
}
}
}