0

I have tried all the solutions suggested here, for this question, but none of them works. Could the solution for Xamarin be a different one?

This is what I have tried, based on this answer here:

Stack Overflow answer

actionSheetAlert = new UIActionSheet("Select Make",null,null,null,null);

foreach(string item in allData)
{
    actionSheetAlert.AddButton(item);
}       

actionSheetAlert.AddButton("Cancel");

//Add Cancel button

actionSheetAlert.CancelButtonIndex = actionSheetAlert.ButtonCount-1;

actionSheetAlert.ShowInView(tableView);

Adding a cancel button with an empty string(instead of null) as others have also suggested , during the initialization of the actionsheet also doesn't solve it for me. I still have missing separator lines towards the end.

See screen shot below.

enter image description here

Community
  • 1
  • 1
naffie
  • 679
  • 1
  • 12
  • 29

1 Answers1

0

Since the UIActionSheet is obsolete for iOS 8, I tried going with the recommended UIAlertController but the result was the same because I wanted to use the UIAlertControllerStyle as the UIActionSheet. I eventually decided to go with a normal UITableView to display my list of data.

My lists were too long for an action sheet anyway and needed scrolling, so a tableview seemed logical here.

naffie
  • 679
  • 1
  • 12
  • 29