예제 #1
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Current = this;
            Forms.Init();

            window = new UIWindow(UIScreen.MainScreen.Bounds);

            restaurants = LoadXml();

            App.SetContent(restaurants);

            LoadApplication(new App());

            // for debugging Properties
            var documents = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            Console.WriteLine(documents);
            // then look in /.config/.isolated-storage/PropertyStore.forms

            if (UIDevice.CurrentDevice.CheckSystemVersion(9, 0))
            {
                // Code that requires iOS 9, like CoreSpotlight or 3D Touch
                SearchModel = new SpotlightHelper(restaurants);
            }
            else
            {
                // Code for earlier versions
                Console.WriteLine("CoreSpotlight not supported");
            }

            return(base.FinishedLaunching(app, options));
        }
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			Current = this;
			Forms.Init ();

			window = new UIWindow (UIScreen.MainScreen.Bounds);

			restaurants = LoadXml ();

			App.SetContent (restaurants);

			LoadApplication (new App ());

			// for debugging Properties
			var documents = Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments); 
			Console.WriteLine (documents);
			// then look in /.config/.isolated-storage/PropertyStore.forms

			if (UIDevice.CurrentDevice.CheckSystemVersion (9, 0)) {
				// Code that requires iOS 9, like CoreSpotlight or 3D Touch
				SearchModel = new SpotlightHelper (restaurants);
			} else {
				// Code for earlier versions
				Console.WriteLine ("CoreSpotlight not supported");
			}

			return base.FinishedLaunching(app, options);
		}