Con*_*nus 15 uiactionsheet ipad ios7
在iPad上,新的ios 7 UIActionSheet没有正确显示,有很多按钮.
在滚动时不清除UIActionSheet的背景.按钮似乎在后台UIActionSheet中冻结.
我的代码:
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];
Run Code Online (Sandbox Code Playgroud)
小智 24
这是我对actionSheet委托的解决方法:
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet {
actionSheet.backgroundColor = [UIColor whiteColor];
for (UIView *subview in actionSheet.subviews) {
subview.backgroundColor = [UIColor whiteColor];
}
}
Run Code Online (Sandbox Code Playgroud)
基于以下答案: 在UIActionSheet按钮中更改文本颜色