我试图将一些目标c代码移植到c#头文件中
@interface MyStorage : NSTextStorage
@end而实现就像
#import "MyStorage .h"
@interface MyStorage ()
@property (nonatomic,strong) NSMutableAttributedString *myAttrString;
- (id)init
{
if (self = [super init]) {
_myAttrString= [NSMutableAttributedString new];
}
return self;
}
- (NSString *)string
{
return [_myAttrString string];
}但我不明白
- (NSString *)string
{
return [_myAttrString string];
}部分。这是一个抽象的属性或类似的东西,但我不知道如何在c#上覆盖它,有人知道这是什么吗?
发布于 2013-12-13 19:39:19
对于您的答复,thnks,Larry,但我在搜索可重写的方法和属性时发现了,它是:
public override IntPtr LowLevelValue {
get {
return _myAttrString.LowLevelValue;
}
}因此,如果运行时出现了一些抽象错误,只需继续查看可忽略的方法和属性:)
发布于 2013-12-12 17:36:15
NSAttributedString.Value属性保存字符串的文本内容。这就是你要找的吗?
https://stackoverflow.com/questions/20537984
复制相似问题