Skip to content

Instantly share code, notes, and snippets.

@FabiolaRamirez
Created April 1, 2019 21:02
Show Gist options
  • Select an option

  • Save FabiolaRamirez/e74da41ba90105419bc5fbb7466b5c5a to your computer and use it in GitHub Desktop.

Select an option

Save FabiolaRamirez/e74da41ba90105419bc5fbb7466b5c5a to your computer and use it in GitHub Desktop.
let bottonText = NSMutableAttributedString(string: "$\(currentPotentialCreditUsageValue) ", attributes:
[NSAttributedString.Key.foregroundColor : UIColor.creditSesameGrayTextColor,
NSAttributedString.Key.font : UIFont.latoBold(14)])
let tooltipAttachment = NSTextAttachment()
tooltipAttachment.image = UIImage(named: "tooltip_icon")
tooltipAttachment.bounds = CGRect(x: 0, y: -3, width: 18, height: 18)
let imageString = NSAttributedString(attachment: tooltipAttachment)
bottonText.append(imageString)
//AQUI PONER GETURES RECOGNIZER 1
bottonText.append(NSAttributedString(string: " out of ", attributes:
[NSAttributedString.Key.foregroundColor : UIColor.creditSesameGrayTextColor,
NSAttributedString.Key.font : UIFont.lato(14)]))
bottonText.append(NSAttributedString(string: "$\(limitPotentialCreditUsageValue) ", attributes:
[NSAttributedString.Key.foregroundColor : UIColor.creditSesameGrayTextColor,
NSAttributedString.Key.font : UIFont.latoBold(14)]))
let tooltipAttachment2 = NSTextAttachment()
tooltipAttachment2.image = UIImage(named: "tooltip_icon")
tooltipAttachment2.bounds = CGRect(x: 0, y: -3, width: 18, height: 18)
let imageString2 = NSAttributedString(attachment: tooltipAttachment2)
bottonText.append(imageString2)
//AQUI PONER GETURES RECOGNIZER 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment