ios-samples/Tabbed_Images/SecondViewController.cs

51 строка
1.3 KiB
C#

using UIKit;
using CoreGraphics;
using System;
using Foundation;
namespace Tabbed_Images
{
public partial class SecondViewController : UIViewController
{
public SecondViewController (string nibName, NSBundle bundle) : base (nibName, bundle)
{
this.Title = NSBundle.MainBundle.LocalizedString ("Second", "Second");
//this.TabBarItem.Image = UIImage.FromBundle ("Images/second");
this.TabBarItem.Image = UIImage.FromFile("Images/second.png");
}
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;
}
}
}
}