Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 在MKMapView的子类中设置属性时发生异常_Iphone_Ios_Properties_Mkmapview_Subclass - Fatal编程技术网

Iphone 在MKMapView的子类中设置属性时发生异常

Iphone 在MKMapView的子类中设置属性时发生异常,iphone,ios,properties,mkmapview,subclass,Iphone,Ios,Properties,Mkmapview,Subclass,我犯了一个奇怪的错误。在以发布模式安装测试应用程序后,出现了一个错误: [SomeMapView setRotateEnabled:]: unrecognized selector sent to instance 0x1c58ac40 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SomeMapView setRotateEnabled:]: unrecognized

我犯了一个奇怪的错误。在以发布模式安装测试应用程序后,出现了一个错误:

[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;
}

也许有人知道发生了什么?提前感谢。

这是iOS版本中的一个问题。像Suresh指出的那样,RotateeEnabled in仅在iOS7中可用。我必须检查财产是否在那里(或者检查它是否有iOS7)


您的设备正在运行哪个操作系统?rotateEnabled仅在iOS7中可用。是的,这就是问题所在。我更改了测试设备,IOS6中出现了问题。谢谢。
if ([self respondsToSelector:NSSelectorFromString(elementName)]) 
{
    [self setValue:elementInnerText forKey:elementName];
}