Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/16.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
Ios 有没有办法不旋转由MKMapView.convert生成的CGRect,即使该贴图已旋转 //地球上特定位置的物体长度/宽度(以米为单位) 让objectLatMeter:CLLocationDistance=CLLocationDistance.init(精确:18.3)! 让objectLngMeter:CLLocationDistance=CLLocationDistance.init(精确:9)! 让mapViewCenterCoordinate=self.mapView.centerCoordinate 设objectmkrect=MKCoordinateRegion.init(中心:mapViewCenterCoordinate,纬度计:objectLatMeter,纵向计:objectLngMeter) // ??? 让rightSizedRect=self.mapView.convert(objectmkrect,toRectTo:self.imageView) self.imageView.frame=rightSizedRect_Ios_Swift_Mapkit - Fatal编程技术网

Ios 有没有办法不旋转由MKMapView.convert生成的CGRect,即使该贴图已旋转 //地球上特定位置的物体长度/宽度(以米为单位) 让objectLatMeter:CLLocationDistance=CLLocationDistance.init(精确:18.3)! 让objectLngMeter:CLLocationDistance=CLLocationDistance.init(精确:9)! 让mapViewCenterCoordinate=self.mapView.centerCoordinate 设objectmkrect=MKCoordinateRegion.init(中心:mapViewCenterCoordinate,纬度计:objectLatMeter,纵向计:objectLngMeter) // ??? 让rightSizedRect=self.mapView.convert(objectmkrect,toRectTo:self.imageView) self.imageView.frame=rightSizedRect

Ios 有没有办法不旋转由MKMapView.convert生成的CGRect,即使该贴图已旋转 //地球上特定位置的物体长度/宽度(以米为单位) 让objectLatMeter:CLLocationDistance=CLLocationDistance.init(精确:18.3)! 让objectLngMeter:CLLocationDistance=CLLocationDistance.init(精确:9)! 让mapViewCenterCoordinate=self.mapView.centerCoordinate 设objectmkrect=MKCoordinateRegion.init(中心:mapViewCenterCoordinate,纬度计:objectLatMeter,纵向计:objectLngMeter) // ??? 让rightSizedRect=self.mapView.convert(objectmkrect,toRectTo:self.imageView) self.imageView.frame=rightSizedRect,ios,swift,mapkit,Ios,Swift,Mapkit,self.mapView.convert(objectmkrect,toRectTo:self.imageView)在引擎盖下做什么self.imageView是一个UIImageView,它位于MKMapView之上 我在此尝试实现的目标:我需要根据缩放随时调整UIImageView(位于地图顶部)的大小。它在起作用,有点。。。它一直在工作,直到我旋转地图

self.mapView.convert(objectmkrect,toRectTo:self.imageView)
在引擎盖下做什么
self.imageView
是一个
UIImageView
,它位于
MKMapView
之上

我在此尝试实现的目标:我需要根据缩放随时调整UIImageView(位于地图顶部)的大小。它在起作用,有点。。。它一直在工作,直到我旋转地图