HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了具有许多按钮的Xcode iPad UIActionSheet不能正确显示iOS7大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
在iPad上,新的ios 7 UIActionSheet没有正确显示许多按钮.

不清理UIActionSheet的滚动背景.这些按钮似乎在背景UIActionSheet中冻结.

screenshot with problem

我的代码

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代理的解决方法
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet {
    actionSheet.BACkgroundColor = [UIColor whiteColor];
    for (UIView *subview in actionSheet.subviews) {
        subview.BACkgroundColor = [UIColor whiteColor];
    }
}

基于这个答案:
Change Text color in UIActionSheet Buttons

大佬总结

以上是大佬教程为你收集整理的具有许多按钮的Xcode iPad UIActionSheet不能正确显示iOS7全部内容,希望文章能够帮你解决具有许多按钮的Xcode iPad UIActionSheet不能正确显示iOS7所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。