で iOS アプリを開発しています。下部に同じXamarinものが 2 つ  あり、スナップショットを含むリストが読み込まれます (1 行のギャラリーのようなもの)。最初のviewControllerからのスナップショットが選択された後、2番目のviewControllerに移動し、viewControllerがロードされたときにスナップショットをPreSelectedにしたいのですが、画面がロードされてからわずか1秒後に. 理由はありますか?viewControllersUICollectionViewSystem.NullReferenceException
ここで最初のviewController:
indexPath をヘルパー クラスに保存し、2nd への移行をNotificationCenter.
public void ItemSelected (UIKit.UICollectionView collectionView, Foundation.NSIndexPath indexPath)
    {
        UICollectionViewCell cell = collectionView.CellForItem (indexPath);
        var newImage = (UIImageView)cell.ViewWithTag (100);
        var selectedBgView = new UIView (cell.Bounds);
        cell.SelectedBackgroundView = selectedBgView;
        cell.SelectedBackgroundView.BackgroundColor = UIColor.Orange;
        ApplicationState.Instance.TappedSnapshot = AppUtils.UIImageToBase64 (newImage.Image); 
        ApplicationState.Instance.SnapshotIndexPath = collectionView.IndexPathForCell (cell); 
        NSNotification notif = NSNotification.FromName ("imageTapped", this);
        NSNotificationCenter.DefaultCenter.PostNotification (notif);
    }
2番目のviewControllerで:
public override void ViewDidAppear (bool animated)
    {
        base.ViewDidAppear (animated);
        CollectionView.SelectItem (ApplicationState.Instance.SnapshotIndexPath, true, UICollectionViewScrollPosition.Right);
        this.ItemSelected (CollectionView, ApplicationState.Instance.SnapshotIndexPath);
    }
public void ItemSelected (UIKit.UICollectionView collectionView, Foundation.NSIndexPath indexPath)
    {
        UICollectionViewCell cell = collectionView.CellForItem (indexPath);
        var selectedBgView = new UIView (cell.Bounds);
        cell.SelectedBackgroundView = selectedBgView;
        cell.SelectedBackgroundView.BackgroundColor = UIColor.Orange;
    }
編集: ViewDidAppear で「ItemSelected」メソッドを使用しない場合、クラッシュしません!