gpt4 book ai didi

ios - UIActionSheet 在 iOS 7 上呈现时显示黑线

转载 作者:行者123 更新时间:2023-11-28 19:03:00 25 4
gpt4 key购买 nike

UIActionSheet' 在我的应用程序之一中正确显示,直到 iOS 7 发布。但是现在当我在 iOS 7 中打开 UIActionSheet 时,它会在操作表的顶角显示黑线。如下图所示 action sheet with black line in corners

在花了很多时间寻找原因后,最后我发现如果我们显示 UIActionSheet title(用一些文本设置 title 属性)然后那些黑线被 iOS 7 删除。像图像 Action sheet with title

但根据要求,我不想显示 UIActionSheet 标题。那么有没有其他方法可以去除角落里的那些黑线?还是 iOS 7 的错误?

- (IBAction) showActionsheetWithoutTitle:(id)sender {
UIActionSheet *actionsheet = [[UIActionSheet alloc] initWithTitle:@"" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Button1", @"Button2",@"Button3", nil];
[actionsheet showInView:self.view];}

最佳答案

将 initWithTitle 的 @""替换为 nil,因为它在标题和其他按钮之间留出一个小间隙:

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:@"Button1", @"Button2",@"Button3", nil];

关于ios - UIActionSheet 在 iOS 7 上呈现时显示黑线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23076421/

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