public void ItemSelected(UICollectionView collectionView, NSIndexPath indexPath)
        {
            var selectedPhoto = GetPhoto(indexPath);

            var detailViewController = PhotoDetailViewController.LoadFromStoryboard();

            detailViewController.Photo = selectedPhoto;
            NavigationController.PushViewController(detailViewController, true);
        }
Example #2
0
        bool Configure(UIWindow window, NSUserActivity activity)
        {
            if (activity.Title == GalleryOpenDetailData.DetailPath)
            {
                if (activity.UserInfo [GalleryOpenDetailData.PhotoIdKey] is NSString photoId)
                {
                    if (PhotoDetailViewController.LoadFromStoryboard() is PhotoDetailViewController photoDetailViewController)
                    {
                        photoDetailViewController.Photo = new Photo {
                            Name = photoId
                        };

                        if (window.RootViewController is UINavigationController navigationController)
                        {
                            navigationController.PushViewController(photoDetailViewController, true);
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }