开发者

Adding Extra Title Attributes to MKAnnotation?

开发者 https://www.devze.com 2023-01-01 08:17 出处:网络
Currently I have a subClass of MKAnnotation and I was wondering if its possible t开发者_C百科o add extra tile attributes. Currently MKAnnotation adds

Currently I have a subClass of MKAnnotation and I was wondering if its possible t开发者_C百科o add extra tile attributes. Currently MKAnnotation adds

  • Title
  • Subtitle

Is there a way I could add two more lines / NSStrings to allow 4 lines of text?

  • Title
  • SubTitle
  • Location
  • Date

gary


If you want the extra lines, you'll have to make your own version of an annotation view. There is some information about making a custom annotation view here:

http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html

The other thing you can do is to put the extra information together in the subtitle, or use one of the callout accessory views (for example, use icons to represent different locations or dates).

0

精彩评论

暂无评论...
验证码 换一张
取 消