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(位于地图顶部)的大小。它在起作用,有点。。。它一直在工作,直到我旋转地图