有没有办法阻止这种情况发生并保持视图锁定在北方?我在这里看到了一些提示,但没有任何内容涉及任何类型的内置机制.
解决方法 快速浏览Apple关于MKMapVIEw的文档:rotateEnabled A Boolean value indicating whether the map camera’s
heading information is used.@property(nonatomic,getter=isRotateEnabled) BOol rotateEnabled
discussion When this property is set to YES and a valID camera is
associated with the map,the camera’s heading angle is used to rotate
the plane of the map around its center point. When this property is
set to NO,the camera’s heading angle is ignored and the map is always
orIEnted so that true north is situated at the top of the map vIEw.
因此,您可以尝试将mapvIEw rotateEnabled属性设置为’NO’.
Apple MKMapView reference
总结以上是内存溢出为你收集整理的ios7 – MKMapView禁用旋转全部内容,希望文章能够帮你解决ios7 – MKMapView禁用旋转所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)