Пример #1
0
        public virtual void settingsTouched(object sender, EventArgs e)
        {
            SettingsViewController settings = new SettingsViewController(this);
            UIUserInterfaceIdiom   idiom    = UIDevice.CurrentDevice.UserInterfaceIdiom;

            if (idiom == UIUserInterfaceIdiom.Pad)
            {
                if (popover != null && popover.PopoverVisible)
                {
                    popover.Dismiss(true);
                    return;
                }
                popover = new UIPopoverController(settings);
                CGRect settingsRect = settings.View.Bounds;
                settings.Table.SizeToFit();
                popover.PopoverContentSize = new CGSize((float)(Math.Min(settingsRect.Size.Width, settingsRect.Size.Height) / 2.0), settings.Table.ContentSize.Height);
                popover.PresentFromBarButtonItem(settingsButton, UIPopoverArrowDirection.Up, true);
            }
            else
            {
                this.NavigationController.PushViewController(settings, true);
            }
        }
 public virtual void settingsTouched(object sender, EventArgs e)
 {
     SettingsViewController settings = new SettingsViewController (this);
     UIUserInterfaceIdiom idiom = UIDevice.CurrentDevice.UserInterfaceIdiom;
     if (idiom == UIUserInterfaceIdiom.Pad)
     {
         if (popover != null && popover.PopoverVisible)
         {
             popover.Dismiss (true);
             return;
         }
         popover = new UIPopoverController (settings);
         CGRect settingsRect = settings.View.Bounds;
         settings.Table.SizeToFit ();
         popover.PopoverContentSize = new CGSize ((float)(Math.Min(settingsRect.Size.Width, settingsRect.Size.Height) / 2.0), settings.Table.ContentSize.Height);
         popover.PresentFromBarButtonItem (settingsButton, UIPopoverArrowDirection.Up, true);
     }
     else
     {
         this.NavigationController.PushViewController (settings, true);
     }
 }
 public TableViewDataSource(SettingsViewController owner)
 {
     this.owner = owner;
 }
 public TableViewDelegate(SettingsViewController owner)
 {
     this.owner = owner;
 }
Пример #5
0
 public TableViewDataSource(SettingsViewController owner)
 {
     this.owner = owner;
 }
Пример #6
0
 public TableViewDelegate(SettingsViewController owner)
 {
     this.owner = owner;
 }