【发布时间】:2012-07-02 10:54:05
【问题描述】:
如何制作一个基本上是水平分隔符的 NSAttributedString,例如 HTML 的 <hr> 标签?
我试过了:
NSAttributedString *hr = [[NSAttributedString alloc] initWithHTML:
[NSData
dataWithBytes:"<html><body><hr>hi</body></html>"
length:strlen("<html><body><hr>hi</body></html>")]
documentAttributes:NULL];
但是,<hr> 标记不会出现。不过,将字符串添加到我的视图中是可行的,因为我可以看到 hi。
【问题讨论】:
标签: html cocoa osx-lion separator nsattributedstring