NSAttributedString的各種屬性設定

2021-07-22 06:12:40 字數 558 閱讀 7301

nsmutableattributedstring *str = [[nsmutableattributedstring alloc] initwithstring:@"請輸入你要填入的字串"];

[str addattribute:nsforegroundcolorattributename value:[uicolor bluecolor] range:[string rangeofstring:@"你所要設定顏色的字段,也可以直接寫range,我這裡這樣用方便"]];

[str addattribute:nsfontattributename value:[uifont systemfontofsize:16] range:[string rangeofstring:@"你所要設定大小的字段,也可以直接寫range,我這裡這樣用方便"]];

wxVectorProperty 屬性的設定

用wx中屬性網格屬性設定時遇到了些麻煩。為了設定編輯器中模型的3d座標,在屬性網格中加了3d座標屬性。但是在設定wxvectorproperty,不知道如何設定。後來在wxpropertygridproperties檔案中找到了這個巨集wx pg declare variant data wxvec...

CSS的各種屬性

css的各種屬性 css的單位 a.絕對單位 1in 2.54cm 25.4mm 72pt 6pc pt是點或者磅,pc是派卡 b.相對單位 px,em 印刷單位相當於12個點 相對周圍的文字 字型設定 p 文字設定 p 背景設定 body 列表設定 ul li 盒子模型 border margin...

UILabel的各種屬性

uilable是iphone介面最基本的控制項,主要用來顯示文字資訊。常用屬性和方法有 1 建立 cgrect rect cgrectmake 100,200,50,50 uilabel label uilabel alloc initwithframe rect 2 text 設定和讀取文字內容,...