一张 iPhone 地图标注中包含 2 条线条和按钮
我对 xcode 和 iPhone 开发相当陌生,我想知道是否可以基本上使用一行文本和最右侧的按钮来获取标准地图标注,并在一个标注中将其加倍。因此,它是一个双高标注气泡,两行文本彼此重叠,每行最右侧都有一个按钮。实际上,我希望第一个转到详细信息页面,第二个提供注释的方向。有没有一种方法可以按照描述进行自定义标注而又不会变得太复杂?
I'm fairly new to xcode and iPhone development and I'm wondering if it's possible to basically take your standard map callout with one line of text with a button at the far right, and double that within one callout. So it's one double-high callout bubble with two lines of text on top of each other, each one with a button at the far right of it. Practically, I would like the first one to go to a details page and the second one to offer directions to the annotation. Is there a way to make a custom callout as described without getting too complicated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看异步解决方案博客对于标注替换实现,尽管这可能比您想要做的工作更多。我认为没有一种简单的方法可以做你想做的事。
Check out the Asynchrony Solutions Blog for a callout replacement implementation, though it may be more work than you're looking to do. I don't think there's a simple easy way to do what you want.
您可以实现委托方法、viewForAnnotation,如下所示
注释的自定义类如下
注释的自定义类实现
You can implement delegate method, viewForAnnotation as below
Custom class for Annotation as below
Custom class implementation of Annotation