虽然大多数苹果文档编写得很好,但我认为" iOS事件处理指南 "是一个例外.我很难清楚地了解那里描述的内容.
该文件说,
在命中测试中,窗口调用
hitTest:withEvent:视图层次结构的最顶层视图; 此方法通过递归调用pointInside:withEvent:视图层次结构中返回YES的每个视图继续进行,继续向下移动层次结构,直到找到触摸发生在其边界内的子视图.该视图成为热门测试视图.
那么只有hitTest:withEvent:系统调用最顶层的视图,调用pointInside:withEvent:所有子视图,如果从特定子视图返回是YES,那么调用pointInside:withEvent:该子视图的子类?
以下是我在调试区域收到的错误消息.它运行正常,没有任何错误,除了我收到此错误.这会阻止苹果接受应用吗?我如何解决它?
2012-07-26 01:58:18.621 Rolo[33597:11303] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x887d630 h=--& v=--& V:[UIButtonLabel:0x886ed80(19)]>",
"<NSAutoresizingMaskLayoutConstraint:0x887d5f0 h=--& …Run Code Online (Sandbox Code Playgroud) 什么是CALayer(如layerUIView上的属性所示)以及我们在哪里使用这样的类?
我对层掩蔽如何工作有一些困难.现在,我有一个带UILabels的UIView.我想象两层 - 一层是背面的UIView,另一层是顶部的标签.如果我屏蔽UIView图层,标签也会受到蒙版的影响.
UILabels是父UIView的孩子,所以我也能理解影响孩子的父面具.
但是,当我从图层来看它时,它似乎没有意义.为什么屏蔽最深层会影响到最顶层?
ios ×3
objective-c ×3
uiview ×3
cocoa ×2
calayer ×1
cocoa-touch ×1
debugging ×1
iphone ×1
macos ×1
uikit ×1