Stan iOS9 课程笔记

Stanford_iOS_L04_View

2017-01-17  本文已影响0人  Shaw233

Frame & Bounds ( Coordinate System )

Frame is about where ur view is in its super view 

and the View B may Rotate , it`s bounds is 200 width by 250 high , why?  (completely contain this view) .  U drawn in B , u will not consider it was rotated.

and i fund that this pic could not be scaled  =..=

Stroke color -- 

let transparentYellow  = UIColor.yellowColor().colorWithAlphaComponent(0.5)

this is a instance method ?

because  we use this type method yellowColor() to get an instance of a color and

we sent it this instance  to get a half transparent version of yellow

and the default of the UIView is opaque = true  , set it false if the transparency gonna work

Tip , if u want ur View animated to fade out ? remember the alpha

上一篇 下一篇

猜你喜欢

热点阅读