gpt4 book ai didi

ipad - 带有许多按钮的 Xcode iPad UIActionSheet 无法正确显示 iOS7

转载 作者:行者123 更新时间:2023-12-03 20:09:16 30 4
gpt4 key购买 nike

在 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 委托(delegate)的解决方法:

- (void)willPresentActionSheet:(UIActionSheet *)actionSheet {
actionSheet.backgroundColor = [UIColor whiteColor];
for (UIView *subview in actionSheet.subviews) {
subview.backgroundColor = [UIColor whiteColor];
}
}

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

关于ipad - 带有许多按钮的 Xcode iPad UIActionSheet 无法正确显示 iOS7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19025852/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com