On the iPad new ios 7 UIActionSheet is not correctly displayed with lots of buttons.
Not cleaning background of UIActionSheet on scrolling. The buttons seem frozen in background UIActionSheet.
My code :
UIActionSheet *popupQuery = [[UIActionSheet alloc];
for (int i=0; i<[ParamAllList count]; i++)
{
NSMutableDictionary *Param = [ParamAllList objectAtIndex:i];
[popupQuery addButtonWithTitle:[Param valueForKey:@"name"]];
[[[popupQuery valueForKey:@"_buttons"] objectAtIndex:[[popupQuery valueForKey:@"_buttons"] count]-1] setImage:[UIImage imageNamed:@"add40icon.png"] forState:UIControlStateNormal];
}
popupQuery.actionSheetStyle = UIActionSheetStyleAutomatic;
[popupQuery showFromRect:Button_Settings.frame inView:Button_Settings.superview animated:YES];
Funny thing - this bug still exists in iOS 7.1beta4 :)
And doesn't appear in iPhone implementation, only iPad...
And its origin is quite strange - "blurry" effect is showing when an UIActionSheet has so many items, so it have to put these in an UITableView like container, but unfortunately this view container is put twice (and it isn't the same instance). So we need to leave only one and remove others.
Antoher thing we need to correct is the UITableView height.
Below my fix - to implement in UIActionSheetDelegate -(void)willPresentActionSheet:
This was my workaround for the actionSheet delegate:
Based off of this answer: Change Text color in UIActionSheet Buttons