Closed crspybits closed 7 years ago
Here's what I have working:
let agreementAttr:[NSAttributedStringKey : Any] = [
NSAttributedStringKey(rawValue:ZSWTappableLabelTappableRegionAttributeName): true,
NSAttributedStringKey.foregroundColor: UIColor.blue,
NSAttributedStringKey(rawValue:ZSWTappableLabelHighlightedForegroundAttributeName): UIColor.lightGray,
NSAttributedStringKey(rawValue: linkNameKey): userAgreementKey,
]
let agreement = NSAttributedString(string: "User Agreement ", attributes: agreementAttr)
I'll be updating this for Swift 4 (since I absolutely need it at work) in the next couple weeks, but I think it's just a few header changes, so PRs welcome!
I think this example:
doesn't work any more with
NSAttributedStringKey
keys for attributed strings.