Found a solution, it's a bit hacky. First I check if it's landscaped and that there are more than 5 buttons. When there are 6 or more, that's when it changes to a scrolling action sheet and that's when the problem occurs. If all that is true, I set the title to an empty string, with a space
[sheet setTitle: @" "];
This gives the white background to the button, but it leaves us with a big empty white space above, given you don't want a title.
To fix this, in willPresentActionSheet
, I slide down the backdrop
if (actionSheet.title)
{
if ([actionSheet.title.trim isEqualToString: @""])
{
CGRect backdropFrame = [[[actionSheet subviews] objectAtIndex: 0] frame];
backdropFrame.origin.y += 45;
backdropFrame.size.height -= 55;
[[[actionSheet subviews] objectAtIndex: 0] setFrame: backdropFrame];
}
}