Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to navigate from a UICollectionView to another view by clicking the cell

$
0
0

Hey, guys, i'm working on a project on Xamarin.iOS, the problem is i can't navigate from a UICollectionView to another ViewController by clicking some specific cell, i try to after the cell is clicked open a AlertView with a button and when the user clicks that button open another view, but that doesn't work, here is my code:

public override void ItemSelected(UICollectionView collectionView, NSIndexPath indexPath)
        {
            var cell = (EnvioCell)collectionView.CellForItem(indexPath);

            UIAlertView alert = new UIAlertView()
            {
                Title = "Options",
                Message = "Guide: " + localitems[indexPath.Row].guide + "\nStatus: " + localitems[indexPath.Row].status,
            };
            alert.AddButton("See");
            alert.Show();
            alert.Clicked += ButtonClicked;
        }    

            public void ButtonClicked(object sender, UIButtonEventArgs e)
            {
                try
                { 
            information.PerformSegue("segCollectionInformation", this); 
        }
                catch (Exception e) {throw e;}
            }

I hope you can help me with this issue, i really need that funtionality!!


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>