0
我正在使用DTAttributedTextView以nsstring格式显示html数据。是否有将此视图中的文本与中心对齐的方法。如何在DTAttributedTextView中将文本对齐到中心
我正在使用DTAttributedTextView以nsstring格式显示html数据。是否有将此视图中的文本与中心对齐的方法。如何在DTAttributedTextView中将文本对齐到中心
我认为它可以像这样&完成添加代码,以IT-
NSMutableString *html = [[NSMutableString alloc] initWithCapacity:1];
[html appendString:@"<html><head>"];
[html appendString:@"<style type=\"text/css\">"];
[html appendString:@"body {"];
[html appendString:@"<center>"];
[html appendString:@"background-color: transparent;"];
[html appendString:@"color: white;"];
[html appendString:@"}"];
[html appendString:@"<center>"];
[html appendString:@"</style>"];
[html appendString:@"</head>"];
[html appendString:@"</body></html>"];