【发布时间】:2012-08-25 01:14:44
【问题描述】:
如何使用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
在Documentation 之后尝试了这个,但没有运气
[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)
提前致谢
亚历克斯。
【问题讨论】:
标签: objective-c ios5 binding xamarin.ios