XamarinEvolveIOS.MeetUpViewController.SortButtonTouched C# (CSharp) Method

SortButtonTouched() private method

private SortButtonTouched ( ) : void
return void
        private void SortButtonTouched()
        {
            UIActionSheet actionSheet = new UIActionSheet ("Select Sort Priority");
            actionSheet.AddButton ("Popular Places");
            actionSheet.AddButton (string.Format("Near {0}", SystemConstants.DefaultPlace.Name));
            actionSheet.AddButton ("Near Me");
            actionSheet.AddButton ("Recent Check-ins");

            actionSheet.AddButton ("Cancel");
            actionSheet.CancelButtonIndex = 4;

            actionSheet.Clicked += (sender, e) => {
                switch (e.ButtonIndex)
                {
                case 0:
                    ChangeSortMethod (PlaceSortMethod.Popularity);
                    break;
                case 1:
                    ChangeSortMethod (PlaceSortMethod.NearConventionCenter);
                    break;
                case 2:
                    ChangeSortMethod (PlaceSortMethod.NearUser);
                    break;
                case 3:
                    ChangeSortMethod (PlaceSortMethod.Recent);
                    break;
                }
            };

            actionSheet.ShowInView (this.View);
        }