相关疑难解决方法(0)

可可:框架和边界之间有什么区别?

UIView及其子类都具有属性framebounds.有什么不同?

cocoa cocoa-touch uiview

567
推荐指数
9
解决办法
18万
查看次数

iOS的事件处理 - hitTest:withEvent:和pointInside:withEvent:如何相关?

虽然大多数苹果文档编写得很好,但我认为" iOS事件处理指南 "是一个例外.我很难清楚地了解那里描述的内容.

该文件说,

在命中测试中,窗口调用hitTest:withEvent:视图层次结构的最顶层视图; 此方法通过递归调用pointInside:withEvent:视图层次结构中返回YES的每个视图继续进行,继续向下移动层次结构,直到找到触摸发生在其边界内的子视图.该视图成为热门测试视图.

那么只有hitTest:withEvent:系统调用最顶层的视图,调用pointInside:withEvent:所有子视图,如果从特定子视图返回是YES,那么调用pointInside:withEvent:该子视图的子类?

uikit uiview ios

144
推荐指数
5
解决办法
8万
查看次数

无法同时满足约束,将尝试通过违反约束来恢复

以下是我在调试区域收到的错误消息.它运行正常,没有任何错误,除了我收到此错误.这会阻止苹果接受应用吗?我如何解决它?

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)

debugging objective-c ios nslayoutconstraint

140
推荐指数
8
解决办法
13万
查看次数

什么是CALayer?

什么是CALayer(如layerUIView上的属性所示)以及我们在哪里使用这样的类?

iphone macos cocoa core-animation objective-c

6
推荐指数
1
解决办法
3907
查看次数

iOS了解图层蒙版

我对层掩蔽如何工作有一些困难.现在,我有一个带UILabels的UIView.我想象两层 - 一层是背面的UIView,另一层是顶部的标签.如果我屏蔽UIView图层,标签也会受到蒙版的影响.

UILabels是父UIView的孩子,所以我也能理解影响孩子的父面具.

但是,当我从图层来看它时,它似乎没有意义.为什么屏蔽最深层会影响到最顶层?

objective-c calayer uiview ios

1
推荐指数
1
解决办法
1747
查看次数