ios Xcode 7 中的“在仅变换层中更改属性 maskToBounds,将不起作用”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32456727/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 07:33:26  来源:igfitidea点击:

"changing property masksToBounds in transform-only layer, will have no effect" in Xcode 7

iosios9xcode7-beta6

提问by StudentX

I am receiving this warning in the debugger console when I launch my app on iPad Xcode 7 beta 6. There was no such warning till Xcode 6. I don't understand why it may have come and that too, only on iPad.

当我在iPad Xcode 7 beta 6上启动我的应用程序时,我在调试器控制台中收到此警告。直到Xcode 6才出现这样的警告。我不明白为什么它可能会出现,而且也只是在 iPad 上。

According to an Apple forum threadit could be a bug from Apple's side. Has anyone found a solution for this?

根据Apple 论坛帖子,这可能是 Apple 方面的错误。有没有人找到解决方案?

回答by Amit Verma

In order to get rid of this error un check clip to bounds option and put scale to fill to view to all view,UIStackView you have used in your project.

为了摆脱此错误,请取消选中剪辑到边界选项并将缩放填充以查看您在项目中使用的所有视图,UIStackView。

回答by T Blank

This is a bug in iOS, and still exists in the latest version, iOS 9.1. If you're reading this, please do us all a favor and file a bug report with Apple.

这是 iOS 中的一个错误,并且在最新版本 iOS 9.1 中仍然存在。如果您正在阅读本文,请帮我们一个忙,并向 Apple 提交错误报告。

You may duplicate my radar (id: 23666339), which can be viewed on Open Radar here: https://openradar.appspot.com/23666339

你可以复制我的雷达(id:23666339),可以在 Open Radar 上查看:https://openradar.appspot.com/23666339

The bug causes the keyboard to take forever to appear, and exists only on iPad as well as the iPad simulators.

该错误导致键盘永远出现,并且仅存在于 iPad 和 iPad 模拟器上。

UPDATE:This issue has been resolved as of iOS 9.2 (13C75).

更新:此问题已从 iOS 9.2 (13C75) 开始解决。

回答by Паша Матюхин

It could happen because you changed drawing attribute of the StackView:

这可能是因为您更改了 StackView 的绘图属性:

enter image description here

在此处输入图片说明

when I set clips to bounds to true I get this warning

当我将剪辑设置为 true 时,我收到此警告