public override async void RowSelected(UITableView tableView, NSIndexPath indexPath) { // Remove selection so it looks better on slide in tableView.DeselectRow(indexPath, true); if (!await _parent._picker.EnsureHasPhotosPermission()) { return; } var cell = tableView.CellAt(indexPath); // Init the GMGridViewController var gridViewController = new GMGridViewController(_parent._picker); // Set the title gridViewController.Title = _parent._collectionsFetchResultsTitles[indexPath.Section][indexPath.Row]; // Use the prefetched assets! gridViewController.AssetsFetchResults = _parent._collectionsFetchResultsAssets [indexPath.Section] [indexPath.Row]; // Push GMGridViewController _parent.NavigationController.PushViewController(gridViewController, true); }
private void SetupNavigationController() { if (_albumsViewController == null) { _albumsViewController = new GMAlbumsViewController(); } _albumsViewController._picker = this; _albumsViewController.Test(); var _gridViewController = new GMGridViewController(this); _gridViewController.AssetsFetchResults = _albumsViewController._collectionsFetchResultsAssets[0][0]; _navigationController = new UINavigationController(_gridViewController); _navigationController.Delegate = new GMNavigationControllerDelegate(); _navigationController.NavigationBar.Translucent = true; _navigationController.View.Frame = View.Frame; _navigationController.WillMoveToParentViewController(this); View.AddSubview(_navigationController.View); AddChildViewController(_navigationController); _navigationController.DidMoveToParentViewController(this); }
public GMGridViewCollectionViewSource(GMGridViewController parent) { _parent = parent; }
public override async void RowSelected (UITableView tableView, NSIndexPath indexPath) { // Remove selection so it looks better on slide in tableView.DeselectRow (indexPath, true); if (!await _parent._picker.EnsureHasPhotosPermission ()) { return; } var cell = tableView.CellAt (indexPath); // Init the GMGridViewController var gridViewController = new GMGridViewController (_parent._picker); // Set the title gridViewController.Title = cell.TextLabel.Text; // Use the prefetched assets! gridViewController.AssetsFetchResults = _parent._collectionsFetchResultsAssets [indexPath.Section] [indexPath.Row]; // Push GMGridViewController _parent.NavigationController.PushViewController (gridViewController, true); }