Hidden.Alpha.Opaque的区别 在iOS中,每个View都有Hidden.Alpha.Opaque三个关于透明的属性,官方文档介绍如下: 1. @property(nonatomic) CGFloat alpha; This value affects only the current view and does not affect any of its embedded subviews.Changes to this property can be animated. 2.…
alpha 属性为0.0时视图完全透明,为1.0时视图完全不透明. hidden属性为YES时视图隐藏,否则不隐藏. 注意事项: 1 当视图完全透明或者隐藏时,不能响应触摸消息. 也就是alpha等于0.0或者hidden为YES的时候,但是当alpha<0.01的时候,视图就已经接收不到消息了. 2 视图的alpha值会影响子视图的绘制,但是子视图的alpha值不变. 文档的原文:This value affects only the current view and does not aff…
Views Because view objects are the main way your application interacts with the user, they have many responsibilities. Here are just a few: 通过view对象是与用户交互的主要方式,它们有很多责任,下面是其中一些: Layout and subview management 布局 A view defines its own default resizin…