ios-samples/StoreKit/ProductView/AppDelegate.cs

57 строки
1.7 KiB
C#
Исходник Постоянная ссылка Обычный вид История

2012-09-20 15:49:22 +04:00
using System;
using System.Collections.Generic;
using System.Linq;
2015-01-19 18:09:40 +03:00
using Foundation;
using UIKit;
2012-09-20 15:49:22 +04:00
namespace ProductView {
public class Application {
2012-09-20 15:49:22 +04:00
// This is the main entry point of the application.
static void Main (string [] args)
2012-09-20 15:49:22 +04:00
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main (args, null, "AppDelegate");
}
}
2015-01-19 18:09:40 +03:00
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
2012-09-20 15:49:22 +04:00
// application events from iOS.
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate {
2012-09-20 15:49:22 +04:00
// class-level declarations
UIWindow window;
UINavigationController navigationController;
UIViewController viewController;
//
2015-01-19 18:09:40 +03:00
// This method is invoked when the application has loaded and is ready to run. In this
2012-09-20 15:49:22 +04:00
// 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);
2015-01-19 18:09:40 +03:00
viewController = new ProductViewController ();
2015-01-19 18:09:40 +03:00
navigationController = new UINavigationController ();
navigationController.NavigationBar.Translucent = false;
2012-09-20 15:49:22 +04:00
navigationController.PushViewController (viewController, false);
2015-01-19 18:09:40 +03:00
2012-09-20 15:49:22 +04:00
window.RootViewController = navigationController;
// make the window visible
window.MakeKeyAndVisible ();
2015-01-19 18:09:40 +03:00
2012-09-20 15:49:22 +04:00
return true;
}
}
}