記錄幾個 CALayer 的重要屬性 三

2021-07-06 07:49:49 字數 787 閱讀 5256

記錄幾個 calayer 的重要屬性

有關邊框配置

/* the width of

the layer's border, inset from

the layer bounds. the

* border is composited above

the layer's content and sublayers and

* includes the effects of

the `cornerradius' property. defaults to

* zero. animatable. */

配置層邊框的寬度, 從本層的邊緣. 對圓角同樣有效

borderwidth 的配置方式如下:

calayer *sublayer =[calayer layer];

sublayer.borderwidth = 3;

/* the color of

the layer's border. defaults to opaque black. colors

* created from tiled patterns are supported. animatable. */

配置層邊框的顏色, 預設顏色為黑色 從本層的邊緣. 對圓角同樣有效

bordercolor 的配置方式如下:

sublayer.bordercolor = [uicolor whitecolor].cgcolor

;

CALayer的一些重要屬性

calayer 的一些重要屬性 1.shadowpath 設定 calayer 背景 shodow 的位置 2.shadowoffset shadow 在 x 和 y 軸 上延伸的方向,即 shadow 的大小 3.shadowopacity shadow 的透明效果 4.shadowradius ...

ScrollViewer的幾個寬度高度屬性

編輯 收藏actualheight 獲取 frameworkelement 的呈現高度。繼承自 frameworkelement。actualwidth 獲取 frameworkelement 的呈現寬度。繼承自 frameworkelement。extentheight 獲取 scrollview...

RelativeLayout的一些重要屬性

第一類 屬性值為true或false android layout centerhrizontal 水平居中 android layout centervertical 垂直居中 android layout centerinparent 相對于父元素完全居中 android layout alig...