0

My annotation looks like this now: enter image description here

As you can see the text is too long for it to be showed. How can i make a new sentence below? Or just make the annotation subtitle wider so i can see all the text?

I want it to say "Antal personer: 5. Riktning öst: 4. Riktning väst: 1."

But the best would be:

"Antal personer: 5 Riktning öst: 4 Riktning väst: 1"

I have not been able to find any information on how to make a new row in subtitle. I have seen something with /n but it does not work.

Jesper
  • 25
  • 5

1 Answers1

1

in iOS 9 we have a new property named detailCalloutAccessoryView

You can create a view and set as

annotationView.detailCalloutAccessoryView = tempView 

Please check the link to get more details

MapKit iOS 9 detailCalloutAccessoryView usage

Community
  • 1
  • 1
  • I would follow this recommendation and make 'tempView' a `UITextView` as the default subtitle will go into to a `UILabel`. `UITextView` supports multiple lines and I'm sure you can find other answers on SO to show how to dynamically resize size of the `textView` based off text you have. – NSGangster Jun 10 '16 at 10:01
  • we can set the view size based on the length of the content . please check this link it may help you.http://stackoverflow.com/questions/50467/how-do-i-size-a-uitextview-to-its-content . – Subin K Kuriakose Jun 13 '16 at 05:13