added attribute samples
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
b0b927d56a
commit
f1b386c878
@ -31,10 +31,16 @@ class CheckboxViewController: UIViewController, StoryboardInitable {
|
|||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
var model = DefaultCheckboxModel()
|
var model = DefaultCheckboxModel()
|
||||||
model.labelText = "Terms and conditions"
|
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"
|
model.errorText = "Error Text"
|
||||||
|
|
||||||
surfaceLabel.text = model.surface.rawValue
|
surfaceLabel.text = model.surface.rawValue
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user