<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom callout not shown properly in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12617#M154</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kenneth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I pulled together a sample project as Mark was answering. Turns out it does just about the same thing as his. &lt;A href="https://esriis-my.sharepoint.com/:u:/g/personal/nich6493_esri_com/Ed0OzmPaA-lKu3nN5loSpuoB7xAngZ1z-PGqLmlpjDCNlw?e=7oDnUG"&gt;Download this&lt;/A&gt;, take a look in Xcode, and hopefully it can help you figure out what you're doing that's different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jul 2020 18:22:46 GMT</pubDate>
    <dc:creator>Nicholas-Furness</dc:creator>
    <dc:date>2020-07-15T18:22:46Z</dc:date>
    <item>
      <title>Custom callout not shown properly</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12612#M149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, I would like to show a callout with text in a different font. I created a simple view with a UILabel in the center, when I set the callout custom view to this view it isn't shown properly. I'm fine with the default callout for now but I intend to have more complex custom callouts and was surprised this didn't work as I expected. I'd like to know what I'm doing wrong here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how I set the callout custom view&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/500279_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;How I create the view,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/500283_pastedImage_5.png" /&gt;&lt;/P&gt;&lt;P&gt;The view:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/500281_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;The result:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-4" src="https://community.esri.com/legacyfs/online/500282_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I've tried:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Different values for the view frame's properties (x, y ,width and height)&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2020 19:05:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12612#M149</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-07-14T19:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Custom callout not shown properly</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12613#M150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest removing the call to set the &lt;EM&gt;self.frame&lt;/EM&gt; property in the &lt;EM&gt;MapCalloutMessageView.init&lt;/EM&gt; method. &amp;nbsp;The documentation for the &lt;EM&gt;AGSCallout.customView&lt;/EM&gt; property states:&amp;nbsp;&lt;EM&gt;The callout will expand&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; to fit the dimensions of the custom view.&lt;/EM&gt; &amp;nbsp;That should handle the sizing for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also look at the &lt;A href="https://github.com/Esri/arcgis-runtime-samples-ios"&gt;ArcGIS Runtime Samples for iOS&lt;/A&gt; repo on GitHub, specifically, the Geometry/Project sample which uses a custom callout similar to what you want. &amp;nbsp;The code for that is &lt;A href="https://github.com/Esri/arcgis-runtime-samples-ios/blob/master/arcgis-ios-sdk-samples/Geometry/Project/ProjectViewController.swift"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you still have problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2020 19:49:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12613#M150</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2020-07-14T19:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom callout not shown properly</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12614#M151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried removing the line that sets the frame property, unfortunately still nothing. Thanks for the sample, I noticed the custom view used in that sample is&amp;nbsp;created on the storyboard. Is there a constraint to the callouts custom view option that makes it not work with views from xib files? I plan to have a number of different custom views it would be tough to manage if they were all on the storyboard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2020 22:04:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12614#M151</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-07-14T22:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Custom callout not shown properly</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12615#M152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried it here and got it to work. &amp;nbsp;The `AGSCallout` uses constraints to set up the custom view. &amp;nbsp;What I did was use constraints in the .xib, along with setting the "layout" to `Automatic` (as opposed to translating mask to constraints). &amp;nbsp;See the screenshots below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if that doesn't work for you and I can dig further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="/legacyfs/online/500373_xib layout constraints.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this was both for the view and the label:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/500374_Automatic.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji jive-image image-3 j-img-original" src="/legacyfs/online/500399_custom callout.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code from `didTapAtScreenPoint`:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: rgba(255, 255, 255, 0.85); background-color: #1f1f24; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #fc5fa3;"&gt;let&lt;/SPAN&gt; projectedPoint = &lt;SPAN style="color: #9ef1dd;"&gt;AGSGeometryEngine&lt;/SPAN&gt;.&lt;SPAN style="color: #67b7a4;"&gt;projectGeometry&lt;/SPAN&gt;(mapPoint, to: .&lt;SPAN style="color: #67b7a4;"&gt;wgs84&lt;/SPAN&gt;()) &lt;SPAN style="color: #fc5fa3;"&gt;as&lt;/SPAN&gt;! &lt;SPAN style="color: #9ef1dd;"&gt;AGSPoint&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: rgba(255, 255, 255, 0.85); background-color: #1f1f24; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;customCallout.&lt;SPAN style="color: #67b7a4;"&gt;message&lt;/SPAN&gt; = &lt;SPAN style="color: #fc6a5d;"&gt;"Coordinates\n Original: &lt;/SPAN&gt;\(mapPoint.&lt;SPAN style="color: #67b7a4;"&gt;x&lt;/SPAN&gt;)&lt;SPAN style="color: #fc6a5d;"&gt;, &lt;/SPAN&gt;\(mapPoint.&lt;SPAN style="color: #67b7a4;"&gt;y&lt;/SPAN&gt;)&lt;SPAN style="color: #fc6a5d;"&gt;\n Projected: &lt;/SPAN&gt;\(projectedPoint.&lt;SPAN style="color: #67b7a4;"&gt;x&lt;/SPAN&gt;)&lt;SPAN style="color: #fc6a5d;"&gt;, &lt;/SPAN&gt;\(projectedPoint.&lt;SPAN style="color: #67b7a4;"&gt;y&lt;/SPAN&gt;)&lt;SPAN style="color: #fc6a5d;"&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2020 17:11:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12615#M152</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2020-07-15T17:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Custom callout not shown properly</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12616#M153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May I see how you are instantiating the view in its init function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Used the same constraints you did just to rule that out.&amp;nbsp;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/500403_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;as well as the Automatic layout option&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/500405_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;Same problem &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/500406_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2020 18:09:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12616#M153</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-07-15T18:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom callout not shown properly</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12617#M154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kenneth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I pulled together a sample project as Mark was answering. Turns out it does just about the same thing as his. &lt;A href="https://esriis-my.sharepoint.com/:u:/g/personal/nich6493_esri_com/Ed0OzmPaA-lKu3nN5loSpuoB7xAngZ1z-PGqLmlpjDCNlw?e=7oDnUG"&gt;Download this&lt;/A&gt;, take a look in Xcode, and hopefully it can help you figure out what you're doing that's different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2020 18:22:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12617#M154</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2020-07-15T18:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Custom callout not shown properly</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12618#M155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kenneth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at the code Nick posted, it show's how he's creating the custom view. &amp;nbsp;Specifically:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #5dd8ff; background-color: #1f1f24; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #fc5fa3;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="color: rgba(255, 255, 255, 0.85);"&gt; &lt;/SPAN&gt;MyCustomView&lt;SPAN style="color: rgba(255, 255, 255, 0.85);"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #d0a8ff;"&gt;UIView&lt;/SPAN&gt;&lt;SPAN style="color: rgba(255, 255, 255, 0.85);"&gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: rgba(255, 255, 255, 0.85); background-color: #1f1f24; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #fc5fa3;"&gt;static&lt;/SPAN&gt; &lt;SPAN style="color: #fc5fa3;"&gt;let&lt;/SPAN&gt; &lt;SPAN style="color: #41a1c0;"&gt;instance&lt;/SPAN&gt; = &lt;SPAN style="color: #d0a8ff;"&gt;Bundle&lt;/SPAN&gt;.&lt;SPAN style="color: #a167e6;"&gt;main&lt;/SPAN&gt;.&lt;SPAN style="color: #a167e6;"&gt;loadNibNamed&lt;/SPAN&gt;(&lt;SPAN style="color: #fc6a5d;"&gt;"CustomCalloutView"&lt;/SPAN&gt;, owner: &lt;SPAN style="color: #fc5fa3;"&gt;nil&lt;/SPAN&gt;, options: &lt;SPAN style="color: #fc5fa3;"&gt;nil&lt;/SPAN&gt;)?.&lt;SPAN style="color: #a167e6;"&gt;first&lt;/SPAN&gt; &lt;SPAN style="color: #fc5fa3;"&gt;as&lt;/SPAN&gt;? &lt;SPAN style="color: #9ef1dd;"&gt;MyCustomView&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d;"&gt;and:&lt;/P&gt;&lt;P style="color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="color: #67b7a4; background-color: #1f1f24; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: rgba(255, 255, 255, 0.85);"&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;mapView&lt;SPAN style="color: rgba(255, 255, 255, 0.85);"&gt;.&lt;/SPAN&gt;callout&lt;SPAN style="color: rgba(255, 255, 255, 0.85);"&gt;.&lt;/SPAN&gt;customView&lt;SPAN style="color: rgba(255, 255, 255, 0.85);"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #9ef1dd;"&gt;MyCustomView&lt;/SPAN&gt;&lt;SPAN style="color: rgba(255, 255, 255, 0.85);"&gt;.&lt;/SPAN&gt;instance&lt;/P&gt;&lt;P style="color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d;"&gt;I think with both Nick and I helping out we'll get you sorted. &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d;"&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2020 18:35:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12618#M155</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2020-07-15T18:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom callout not shown properly</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12619#M156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oooh, I needed a reference to the view loaded from the xib and not the instance of the&amp;nbsp;class. I think that's what you get when&amp;nbsp;you&amp;nbsp;get the first object in the array returned from loadNibNamed. Just to be sure I created an outlet in the swift file for the view that holds the label (topmost view), passed it to the callout and it worked. Thank you both so much for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2020 16:10:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12619#M156</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-07-16T16:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom callout not shown properly</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12620#M157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Happy&amp;nbsp;to help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah, when you call &lt;EM&gt;loadNibNamed()&lt;/EM&gt;, you'll get instantiated views as defined in the XIB file. In this case we&amp;nbsp;just have one, so we grab the first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the XIB itself, in the Identity Inspector, we declared that this view class was &lt;STRONG&gt;MyCustomView&lt;/STRONG&gt; (in your case&amp;nbsp;&lt;STRONG&gt;MapCalloutMessageView&lt;/STRONG&gt;) which is a &lt;STRONG&gt;UIView&lt;/STRONG&gt; subclass. So you already have a handle to the root view of what you defined in your XIB, and it will be the class you configured it to be in the XIB. Just mentioning this to be clear that you don't need your custom outlet for the view that holds the label. That's what you get back from &lt;EM&gt;loadNibNamed().first&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="500496" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/500496_pastedImage_6.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad it's working!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2020 16:33:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-callout-not-shown-properly/m-p/12620#M157</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2020-07-16T16:33:02Z</dc:date>
    </item>
  </channel>
</rss>

