How to subclass a UILabel in swift with letter spacing set to 1.5 using NSKernAttribute

ساخت وبلاگ

Vote count: 0

I am trying to subclass a UILabel so that it has a default kerning set to 1.5 then i am going to use that in my app with multiple labels. goal is to have default kern set out of the box so i can avoid repeated code all over the place also labels are set as mix of attributed and regular text Exapmple: @IBoutlet weak var myLabel: CustomeLabelWithKern! myLabel.attributedText = myAttributedText

@IBOutlet weak var myOtherLabelInADifferentViewController: CustomeLabelWithKern!
myOtherLabelInADifferentViewController.text "Foo Bar"

both of these label should have kern of 1.5

asked 14 secs ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : how to subclass in python,how to subclass uiview,how to subclass in swift,how to subclass nsoperation,how to subclass uibutton,how to subclass uicollectionviewflowlayout,how to subclass uiview swift,how to subclass uiviewcontroller,how to subclass uitabbarcontroller,how to subclass in c, نویسنده : استخدام کار backsoft بازدید : 377 تاريخ : يکشنبه 31 مرداد 1395 ساعت: 23:37