Guest User

Untitled

a guest
Feb 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. var attributedString = NSMutableAttributedString()
  2. attributedString = NSMutableAttributedString(string:(data.detailsNoti?.fullName)!, attributes: strres)
  3. let startedfollowing = NSMutableAttributedString(string:" has started following ", attributes: attrs)
  4. attributedString.append(startedfollowing)
  5. var discription = NSMutableAttributedString()
  6. if data.fullName == ""{
  7. discription = NSMutableAttributedString(string:"((data.userName)!)", attributes: strres)
  8. }else{
  9. discription = NSMutableAttributedString(string:"((data.fullName)!)", attributes: strres)
  10. }
  11. print(discription.string.count)
  12. discription.addAttribute(NSAttributedString.Key.link, value: #selector(moveToProfile), range: NSRange(location: 0, length: discription.string.count))
  13. attributedString.append(discription)
  14.  
  15.  
  16. @objc func moveToProfile(){
  17. print("jkr rhvb ve vb iu viure")
  18. }
Add Comment
Please, Sign In to add comment