iOS 7 Simulator Bug - NSAttributedString does not appear

前端 未结 3 1381
暖寄归人
暖寄归人 2021-01-19 05:32

UPDATE: I have just encountered this issue on an actual iPhone 5 running iOS 7. Will provide more information soon.

I think I have found a bug in the iOS 7 Simulat

相关标签:
3条回答
  • 2021-01-19 05:48

    It appears this is not a Simulator bug, but an iOS 7 bug as I have been able to reproduce it on a device now. I have created a new question for it here: iOS 7 BUG - NSAttributedString does not appear

    The bug appears to be the combination of using NSUnderlineStyleAttributeName & NSParagraphStyleAttributeName as attributes for a NSAttributedString.

    0 讨论(0)
  • 2021-01-19 05:57

    Following line causing the issue.

    NSParagraphStyleAttributeName:paragraph

    0 讨论(0)
  • 2021-01-19 06:01

    This Worked for me

    //Swift
    let underlineAttribute = [NSUnderlineStyleAttributeName:NSNumber(int: 1)];
    lblMessage.attributedText = NSAttributedString(string: "Your text", attributes: underlineAttribute)
    //Am33t
    
    0 讨论(0)
提交回复
热议问题