如何使用 ? 绑定它MonoTouch
?
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 60000
@interface NSObject (SubscriptingSupport)
- (id)objectAtIndexedSubscript:(NSUInteger)idx;
- (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)idx;
- (void)setObject:(id)obj forKeyedSubscript:(id <NSCopying>)key;
- (id)objectForKeyedSubscript:(id)key;
@end
#endif
尝试了以下文档,但没有运气
[BaseType (typeof (NSObject)), Bind ("NSObject")]
public interface NSObject2
{
[Bind("objectAtIndexedSubscript:")]
NSObject ObjectAtIndexedSubscript (uint idx);
[Bind("setObject:atIndexedSubscript:")]
void SetObjectAtIndexedSubscript (NSObject obj, uint idx);
[Bind("setObject:forKeyedSubscript:")]
void SetObjectForKeyedSubscript (NSObject obj, NSObject key);
[Bind("objectForKeyedSubscript:")]
NSObject ObjectForKeyedSubscript (NSObject key);
}
它给出了大量的错误,比如
错误 CS0115:“DocParser.Dispose(bool)”被标记为覆盖,但找不到合适的覆盖方法 (CS0115)
提前致谢
亚历克斯。