public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Forms.Init();

            // Create app-level resource dictionary.
            Xamarin.Forms.Application.Current = new Xamarin.Forms.Application();
            Xamarin.Forms.Application.Current.Resources = new MyDictionary();

            Instance = this;
            _window = new UIWindow(UIScreen.MainScreen.Bounds);

            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes
            {
                TextColor = UIColor.Black
            });

            FolderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData));

            NotesPage notesPage = new NotesPage()
            {
                // Set the parent so that the app-level resource dictionary can be located.
                Parent = Xamarin.Forms.Application.Current
            };

            UIViewController notesPageController = notesPage.CreateViewController();
            notesPageController.Title = "Notes";

            _navigation = new AppNavigationController(notesPageController);

            _window.RootViewController = _navigation;
            _window.MakeKeyAndVisible();

            notesPage.Parent = null;
            return true;
        }
예제 #2
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Appearance.Configure();
            Logger.Shared.LogLevel = LogLevel.Debug;

            Window = new UIWindow(UIScreen.MainScreen.Bounds);
            var vc = new AppNavigationController(new MainTabBarController());

            Window.RootViewController = vc;
            Window.MakeKeyAndVisible();
            return(true);
        }
예제 #3
0
    protected override void OnActivate()
    {
        base.OnActivate();

        Navigation = this;

        /*if(_backButton)
         *  _defaultBack = _backButton._button.image.sprite;*/

        _viewStack = new Stack <UIView>();

        if (CurrentView != null)
        {
            _homeView = CurrentView;
            _viewStack.Push(_homeView);
        }
    }
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Forms.Init();

            Instance = this;
            _window  = new UIWindow(UIScreen.MainScreen.Bounds);

            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes
            {
                TextColor = UIColor.Black
            });

            FolderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData));
            UIViewController mainPage = new NotesPage().CreateViewController();

            mainPage.Title = "Notes";

            _navigation = new AppNavigationController(mainPage);

            _window.RootViewController = _navigation;
            _window.MakeKeyAndVisible();

            return(true);
        }
예제 #5
0
 public override void ViewWillAppear(bool animated)
 {
     base.ViewWillAppear(animated);
     collectionView.WeakDelegate   = this;
     collectionView.WeakDataSource = this;
     switch (mode)
     {
     case DisplayMode.MainTab:
         if (TabBarController == null)
         {
             break;
         }
         TabBarController.Title = viewModel.Title;
         var itemL = new UIBarButtonItem(R.Edit, UIBarButtonItemStyle.Plain, (sender, e) => Application.Router.PresentViewController(AppNavigationController.OfModalStyle(new TimelineItemEditorViewController(new TimelineItemEditorViewModel())), true, null));
         TabBarController.NavigationItem.RightBarButtonItem = itemL;
         var itemR = new UIBarButtonItem(R.Search, UIBarButtonItemStyle.Plain, (sender, e) => Application.Router.PresentViewController(AppNavigationController.OfModalStyle(new SearchViewController(new SearchViewModel())), true, null));
         TabBarController.NavigationItem.LeftBarButtonItem = itemR;
         break;
     }
 }