added attribute samples

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-08-04 16:36:49 -05:00
parent b0b927d56a
commit f1b386c878

View File

@ -31,10 +31,16 @@ class CheckboxViewController: UIViewController, StoryboardInitable {
override func viewDidLoad() {
super.viewDidLoad()
var model = DefaultCheckboxModel()
model.labelText = "Terms and conditions"
model.childText = "I agree to Verizon's terms and conditions"
model.childText = "I agree to Verizon's terms and conditions click here"
model.childTextAttributes = [
LabelAttributeUnderline(location: 11, length: 10),
LabelAttributeStrikeThrough(location: 22, length: 5),
LabelAttributeColor(location: 31, length: 10, color: UIColor.blue.hexString!),
LabelAttributeActionModel(location: 31, length: 10){ print("clicked on the word 'conditions'") },
LabelAttributeFont(location: 2, length: 5, style: .BoldTitleLarge, color: UIColor.red.hexString!)
]
model.errorText = "Error Text"
surfaceLabel.text = model.surface.rawValue