private void OpenAddPatternView() { UIImagePickerController ctrl = null; ctrl = Camera.SelectPicture(this, (dic) => { var original = dic[UIImagePickerController.OriginalImage] as UIImage; if (original == null) { return; } var atsvc = new AddToAlbumViewController(original, null, false); atsvc.Success = () => DismissPopupOfModal(ctrl); ctrl.PushViewController(atsvc, true); }, () => { DismissPopupOfModal(ctrl); }); if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) { _pop = new UIPopoverController(ctrl); _pop.PopoverContentSize = new System.Drawing.SizeF(320, 480); _pop.PresentFromRect(this.View.Frame, this.View, UIPopoverArrowDirection.Left, false); } else { PresentViewController(ctrl, true, null); } }
private void SaveSelection() { if (this.GetCurrentPhoto() == null) { return; } var photo = this.GetCurrentPhoto() as Photo; if (photo == null) { return; } var img = photo.UnderlyingImage; if (img == null) { return; } var ctrl = new AddToAlbumViewController(img, photo.Caption, photo.Icon); ctrl.Success = () => { NavigationController.PopToViewController(this, true); this.ShowProgressHUDWithMessage("Saving..."); this.ShowProgressHUDCompleteMessage("Saved!"); }; NavigationController.PushViewController(ctrl, true); }
private void SaveSelection() { if (this.GetCurrentPhoto() == null) return; var photo = this.GetCurrentPhoto() as Photo; if (photo == null) return; var img = photo.UnderlyingImage; if (img == null) return; var ctrl = new AddToAlbumViewController(img, photo.Caption, photo.Icon); ctrl.Success = () => { NavigationController.PopToViewController(this, true); this.ShowProgressHUDWithMessage("Saving..."); this.ShowProgressHUDCompleteMessage("Saved!"); }; NavigationController.PushViewController(ctrl, true); }
private void OpenAddPatternView() { UIImagePickerController ctrl = null; ctrl = Camera.SelectPicture(this, (dic) => { var original = dic[UIImagePickerController.OriginalImage] as UIImage; if (original == null) return; var atsvc = new AddToAlbumViewController(original, null, false); atsvc.Success = () => DismissPopupOfModal(ctrl); ctrl.PushViewController(atsvc, true); }, () => { DismissPopupOfModal(ctrl); }); if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) { _pop = new UIPopoverController (ctrl); _pop.PopoverContentSize = new System.Drawing.SizeF(320, 480); _pop.PresentFromRect(this.View.Frame, this.View, UIPopoverArrowDirection.Left, false); } else { PresentViewController(ctrl, true, null); } }