本文介绍了带有许多按钮的Xcode iPad UIActionSheet无法正确显示iOS7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 在iPad上,新的ios 7 UIActionSheet没有正确显示,有很多按钮。On the iPad new ios 7 UIActionSheet is not correctly displayed with lots of buttons.在滚动时不清除UIActionSheet的背景。按钮似乎在背景UIActionSheet中冻结。Not cleaning background of UIActionSheet on scrolling. The buttons seem frozen in background 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];推荐答案这是我对actionSheet委托的解决方法:This was my workaround for the actionSheet delegate:- (void)willPresentActionSheet:(UIActionSheet *)actionSheet { actionSheet.backgroundColor = [UIColor whiteColor]; for (UIView *subview in actionSheet.subviews) { subview.backgroundColor = [UIColor whiteColor]; }}基于这个答案: 更改UIActionSheet按钮中的文字颜色 这篇关于带有许多按钮的Xcode iPad UIActionSheet无法正确显示iOS7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-02 08:16