Пример #1
0
        private void GoForward(object sender, EventArgs e)
        {
            var croppedPhotos = new List <Tuple <NSDictionary, UIImage> >();

            var currentPhoto = source.ImageAssets.FirstOrDefault(a => a.Asset.LocalIdentifier == source.CurrentlySelectedItem.Item2.LocalIdentifier);

            if (currentPhoto != null)
            {
                currentPhoto.Offset            = _cropView.ContentOffset;
                currentPhoto.Scale             = _cropView.ZoomScale;
                currentPhoto.OriginalImageSize = _cropView.originalImageSize;
                currentPhoto.Orientation       = _cropView.orientation;
            }

            foreach (var item in source.ImageAssets)
            {
                NSDictionary metadata     = null;
                var          croppedPhoto = _cropView.CropImage(item);
                _m.RequestImageData(item.Asset, new PHImageRequestOptions()
                {
                    Synchronous = true
                }, (data, dataUti, orientation, info) =>
                {
                    var dataSource = CGImageSource.FromData(data);
                    metadata       = dataSource.GetProperties(0).Dictionary;
                });

                croppedPhotos.Add(new Tuple <NSDictionary, UIImage>(metadata, croppedPhoto));
            }

            var descriptionViewController = new DescriptionViewController(croppedPhotos, "jpg");

            NavigationController.PushViewController(descriptionViewController, true);
        }
        private void GoToDescription(UIImage image, UIDeviceOrientation orientation)
        {
            var descriptionViewController = new DescriptionViewController(new List <Tuple <NSDictionary, UIImage> >()
            {
                new Tuple <NSDictionary, UIImage>(null, image)
            }, "jpg", orientation);

            NavigationController.PushViewController(descriptionViewController, true);
        }
Пример #3
0
        private void GoToDescription(UIImage image)
        {
            var descriptionViewController = new DescriptionViewController(image, "jpg");

            NavigationController.PushViewController(descriptionViewController, true);
            //var mainTabBar = NavigationController.ViewControllers[0];
            //NavigationController.ViewControllers = new UIViewController[] { mainTabBar, descriptionViewController };
            //NavigationController.PopViewController(true);
        }
Пример #4
0
        private void GoToDescription(UIImage image)
        {
            var descriptionViewController = new DescriptionViewController(image, "jpg");

            NavigationController.PushViewController(descriptionViewController, true);
        }
        private void GoForward(object sender, EventArgs e)
        {
            var descriptionViewController = new DescriptionViewController(ImageAsset, "jpg", _metadata);

            NavigationController.PushViewController(descriptionViewController, true);
        }