How do I resize the callout height based on the content it includes.
In Android, I could use callout.refresh() that resizes the callout based on the lines I have in my text view. In iOS SDK I don't see similar method.
suggestions pls
Hey Todd.
Yes. We apply a max width constraint. It's not supposed to be there when using a custom view, but it seems we have a bug. We'll get that fixed, but in the meantime you could set AGSCallout.autoAdjustWidth to false before you set your custom view:
mapView<SPAN class="punctuation token">.</SPAN>callout<SPAN class="punctuation token">.</SPAN>autoAdjustWidth <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">false</SPAN> mapView<SPAN class="punctuation token">.</SPAN>callout<SPAN class="punctuation token">.</SPAN>customView <SPAN class="operator token">=</SPAN> myCustomView<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN></SPAN>
Sorry about that. Hope this info helps!
I assume you're using a custom UIView for this with the AGSCallout.customView property.
The callout should resize according to its contents. Just make sure that you're resizing the UITextView appropriately. This Stack Overflow thread might help.
Is there a maximum width for the callout? I've been fiddling with this as well and can get the the size to change but the width at least seems to have an upper bound of around 290 or so.
Edit to add: I can set the custom view to a width of say 300 or 400 but the callout just clips it. Setting height to 300 or 400 expands the callout as expected.
Cool, thanks. Works perfectly now.
Thanks a lot ! It helped...
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.