【发布时间】:2013-10-29 21:03:25
【问题描述】:
我遇到了一个奇怪的错误。在发布模式下安装我的测试应用程序后,出现错误:
[SomeMapView setRotateEnabled:]: unrecognized selector sent to instance 0x1c58ac40
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SomeMapView setRotateEnabled:]: unrecognized selector sent to instance 0x1c58ac40'
Mapview 已初始化,在 init 方法中我试图停用旋转。在调试模式下它工作正常。
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
[self setRotateEnabled:FALSE];
[self initDelegate];
}
return self;
}
也许有人知道发生了什么?提前致谢。
【问题讨论】:
-
您的设备运行的是哪个操作系统? rotateEnabled 仅在 iOS7 中可用。
-
是的,这就是问题所在。我更换了测试设备,IOS6出现问题。谢谢。
标签: iphone ios properties mkmapview subclass