ios - 卫星 View 如何在详细 View Controller 中实现,在触摸 MKPinAnnotation 标注时显示

标签 ios objective-c iphone mapkit

在苹果 map 应用程序中,如果您点击 MKPinAnnotation 标注,将显示以下 View 。我试图重新创建类似的东西,但我不确定如何实现卫星图像(我假设它是所选注释坐标上的 MKMapView)以及如何在下拉 View 时为卫星 View 的延伸设置动画?还有 卫星 View 不断地来回旋转 这是标准动画吗?

总结:

  • 顶部的 map 图片是如何实现的?
  • 当用户向下拖动底部(表格) View 时它是如何拉伸(stretch)/缩放的
  • 图像如何设置动画以便旋转,这是内置功能吗?

Screen Shot

最佳答案

How is the map image at the top implemented?

这不是图片。这是一个 MKMapView。

How is it stretched/zoomed when the user drags the bottom(table) view down

使用 scrollView.contentOffest.y 滚动时更新 mapview.frame.size.height。

How is the image animated so that it rotates, is it a built in feature?

MKMapView setCamera:animated:或动画 MKMapView.camera

我做了一个样例你可以下载here .

关于ios - 卫星 View 如何在详细 View Controller 中实现,在触摸 MKPinAnnotation 标注时显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29079373/

相关文章:

iphone - 编译错误与 : switch, "expected expression before"

ios - 如果输入的值超过指定的整数,则清除 UITextField

iphone - 为什么 CorePlot 0.2.2 对于模拟器构建良好,但对于设备却给出链接错误?

ios - 如何在 barChart/swift 中将 Double 值更改为 String?

ios - AVAssetDownloadTask iOS13

iOS ScrollView 、容器 View - 自动布局问题

ios - 当所有 UI 元素都设置为 setTranslatesAutoresizingMaskIntoConstraints = NO 时,为什么我会看到 NSAutoresizingMaskLayoutConstraint

ios - 是否可以在 IOS(Swift 或 Obj-C)中仅显示 Firebase 推送通知的角标(Badge),而不显示警报?

iphone - IPhone 中的 SSL 域错误- https 连接

ios - 无法导入使用 Cocoapods 安装的依赖项