我试着把这条线传送到扎马林
let textStorage = NSTextStorage(attributedString: self.attributedText!)但我找不到接受NSAttributedString的构造函数或静态方法。
发布于 2018-05-15 08:08:42
NSTextStorage的attributedString:初始化器在Xamarin.iOS上丢失了。
您可以在您的Append对象(实际上是在NSMutableAttributedString子类上追加/插入)上执行NSTextStorage \\Insert。
由于您的NSTextStorage在刚刚安装时为空,所以只需使用Append
var textStorage = new NSTextStorage();
textStorage.Append(someMutableAttributedString);备注:这个初始化器是作为一个部分类手动添加到Xamarin.Mac的AppKit框架中的( API生成器中的某些内容一定不喜欢定义它的方式)。
https://stackoverflow.com/questions/50343925
复制相似问题