ibireme / YYText

Powerful text framework for iOS to display and edit rich text.
MIT License
8.84k stars 1.69k forks source link

这是YYTextView的bug吗? #875

Open jdleung opened 5 years ago

jdleung commented 5 years ago

使用的是Swift,用以下代码实现文字竖排。但发现字号不能大于16,如果字号要大于16第一行必须是英文不能是中文,而且字体不能选择中文字体,如PingFangSC-Regular。

不知是bug还是我设置错误?

        let textView = YYTextView(frame: CGRect(x: 20, y: self.view.center.y-100, width: 60, height: 200))
        let myAttribute = [NSAttributedString.Key.font: UIFont(name: "PingFangSC-Regular", size: 18.0)]
        let myAttrString = NSAttributedString(string: "这是最好的时代\n回到未来", attributes: myAttribute as [NSAttributedString.Key : Any])
        textView.attributedText = myAttrString
        textView.isVerticalForm = true
ashen-zhao commented 5 years ago

应该是BUG,他的源码demo,也是一样的问题

chenhuannchu commented 3 years ago

我大于14就显示不出了

HMWDavid commented 2 years ago

各位怎么解决了