作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
UIActionSheet' 在我的应用程序之一中正确显示,直到 iOS 7 发布。但是现在当我在 iOS 7 中打开 UIActionSheet 时,它会在操作表的顶角显示黑线。如下图所示
在花了很多时间寻找原因后,最后我发现如果我们显示 UIActionSheet title
(用一些文本设置 title 属性)然后那些黑线被 iOS 7 删除。像图像
但根据要求,我不想显示 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/
我在 UISearchBar 的上方和下方出现了一些奇怪的黑线,我不太确定如何摆脱它们。将 UISearchBar 的样式设置为最小可以解决该问题,但它没有我想要的背景颜色。 知道是什么原因造成的吗?
在Firefox中,全屏模式下屏幕上方有一条1PX的黑线。 有什么办法可以用网站CSS代码去掉吗? 最佳答案 将以下代码片段添加到 your userChrome.css file使 1px 黑线完全
当在我的 View Controller (导航项中嵌入了大标题和搜索栏)上执行推/弹出转换时,黑线会短暂出现,如下所示: 我基本上尝试过更改所有与导航栏颜色相关的东西,但没有任何帮助。 任何帮助将不
我是一名优秀的程序员,十分优秀!