Monotouch NSTextStorage implementation how to

152 views Asked by At

I'm trying to port some objective c codes to c# header file contains

@interface MyStorage : NSTextStorage
@end

and implementation is something like

#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];
}

but i can not understand the

- (NSString *)string
{
    return [_myAttrString string];
}

part. It's a abstract property or something like that i think, but i do not know how to override it on c#, does anybody know what is that?

2

There are 2 answers

0
user3094206 On BEST ANSWER

thnks for your reply Larry, but i found it as i search for overridable methods and properties, it is:

public override IntPtr LowLevelValue {
            get {
                return _myAttrString.LowLevelValue;
            }
        }

so if you take some abstraction errors on runtime, just keep on looking overridable methods and properties :)

0
Larry OBrien On

The NSAttributedString.Value property holds the string's text content. Is that what you're looking for?