示例#1
0
        public void Logout()
        {
            var controller = UIAlertController.Create("Confirm", "Are you sure you want to logout?", UIAlertControllerStyle.Alert);

            controller.AddAction(UIAlertAction.Create("Cancel", UIAlertActionStyle.Default, (obj) => {}));
            controller.AddAction(UIAlertAction.Create("Logout", UIAlertActionStyle.Default, (obj) =>
            {
                ImageService.Instance.InvalidateCacheAsync(CacheType.All);
                CrossSettings.Current.Clear();
                SlideOutMenuController.View.RemoveFromSuperview();
                UIApplication.SharedApplication.UnregisterForRemoteNotifications();
                MainViewController.Instance = null;
                NavigationController.PopToRootViewController(true);
            }));

            PresentViewController(controller, true, null);
        }
示例#2
0
 public MainViewController(IntPtr handle) : base(handle)
 {
     Instance = this;
 }