Closed CK11FOR333 closed 8 years ago
Is this an attributed string or just a regular string with special characters? I can copy/paste what you included in your issue, but I don't get any of the attributes.
Just pasting the text into the demo project appears to work:
Would you be able to provide the code you're using to set up the label?
I updated pods from v2.7.6 to 2.7.8 and it looks fine =0= I don't know what happened Maybe it's Xcode's bug at that moment.
By the way, here is my code:
labelNameBig.frame.size = CGSize.init(width: 210, height: 50)
labelNameBig.marqueeType = MarqueeType.MLContinuous
labelNameBig.rate = 30
labelNameBig.center = navigationView.center
self.view.addSubview(labelNameBig)
let attributedString = NSMutableAttributedString(string:strName)
attributedString.addAttribute(NSForegroundColorAttributeName, value: UIColor(red: 255/255, green: 102/255, blue: 102/255, alpha: 1), range: NSMakeRange(0, attributedString.length))
attributedString.addAttribute(NSFontAttributeName, value: UIFont(name: "Gill Sans", size: 17)!, range: NSMakeRange(0, attributedString.length))
labelNameBig.attributedText = attributedString
labelNameBig.textAlignment = .Center
labelNameBig.marqueeType = .MLContinuous
labelNameBig.scrollDuration = 15.0
labelNameBig.fadeLength = 10.0
labelNameBig.trailingBuffer = 30.0
Awesome! Maybe you were seeing a similar bug to the issue reported in #146, and the updates fixed it.
When I type the string "【五原素系列】", all the character are not shown.
It would be great to update this.