<?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: about customViewForGraphic method in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/about-customviewforgraphic-method/m-p/13962#M184</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try releasing gdv after it is returned to the method header? Not sure if this will work. Or maybe in the dealloc method?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[gdv release];&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Feb 2012 14:42:23 GMT</pubDate>
    <dc:creator>PaulLohr</dc:creator>
    <dc:date>2012-02-14T14:42:23Z</dc:date>
    <item>
      <title>about customViewForGraphic method</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/about-customviewforgraphic-method/m-p/13961#M183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to custom a callout,here is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- (UIView*) customViewForGraphic:&amp;nbsp;&amp;nbsp; (AGSGraphic *)&amp;nbsp; graphic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; screenPoint:&amp;nbsp; (CGPoint)&amp;nbsp; screen&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapPoint:&amp;nbsp; (AGSPoint *)&amp;nbsp; mapPoint{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; NSMutableDictionary *graphicAttr = [graphic attributes];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; GraphicDetailViewController *gdv = [[GraphicDetailViewController alloc] initWithAttr:graphicAttr];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; gdv.tableView.frame = CGRectMake(screen.x, screen.y, 300, 200);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; gdv.tableView.delegate = gdv;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; return gdv.tableView;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when I compile and analyze,there is a object leak warning:"Object leaked: object allocated and stored into 'gdv' is not referenced later in this execution path and has a retain count of +1".so I use "autorelease" for gdv object,but when i flip the table in callout,the program crashed.the error is :"-[GraphicDetailViewController tableView:cellForRowAtIndexPath:]: message sent to deallocated instance 0x102d8f00"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;how can i resolve this?thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 05:27:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/about-customviewforgraphic-method/m-p/13961#M183</guid>
      <dc:creator>XiaoJing</dc:creator>
      <dc:date>2012-02-13T05:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: about customViewForGraphic method</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/about-customviewforgraphic-method/m-p/13962#M184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try releasing gdv after it is returned to the method header? Not sure if this will work. Or maybe in the dealloc method?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[gdv release];&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 14:42:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/about-customviewforgraphic-method/m-p/13962#M184</guid>
      <dc:creator>PaulLohr</dc:creator>
      <dc:date>2012-02-14T14:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: about customViewForGraphic method</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/about-customviewforgraphic-method/m-p/13963#M185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;- (UIView*) customViewForGraphic:&amp;nbsp;&amp;nbsp; (AGSGraphic *)&amp;nbsp; graphic&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; screenPoint:&amp;nbsp; (CGPoint)&amp;nbsp; screen&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapPoint:&amp;nbsp; (AGSPoint *)&amp;nbsp; mapPoint{&lt;BR /&gt; NSMutableDictionary *graphicAttr = [graphic attributes];&lt;BR /&gt; &lt;BR /&gt; GraphicDetailViewController *gdv = [[GraphicDetailViewController alloc] initWithAttr:graphicAttr];&lt;BR /&gt; gdv.tableView.frame = CGRectMake(screen.x, screen.y, 300, 200);&lt;BR /&gt; gdv.tableView.delegate = gdv;&lt;BR /&gt; return gdv.tableView;&lt;BR /&gt;}&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is at least one problem and possibly two with your code, depending on the implementation of GraphicDetailViewController.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;You are referencing the GDV as the delegate of the tableView object (so you will add a reference count).&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;If the GraphicDataViewController's dealloc method releases the tableView object, then you will have a pointer to an object that was released when the GDV was released (this may be what's happening with your "deallocated instance" error).&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;SPAN&gt;So, perhaps add a property to your class to store the current GraphicsDataViewController. You would set the property to the GraphicsDataViewController created in customViewForGraphic and release it when the callout showing the GraphicsDataViewController is closed. That way the delegate reference on the returned tableView remains valid for the lifetime of the tableView.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 14:45:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/about-customviewforgraphic-method/m-p/13963#M185</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2012-02-15T14:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: about customViewForGraphic method</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/about-customviewforgraphic-method/m-p/13964#M186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You must create a retain property for the GraphicDetailViewController so it'll be around when you try to view it in the callout.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 15:44:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/about-customviewforgraphic-method/m-p/13964#M186</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-02-24T15:44:03Z</dc:date>
    </item>
  </channel>
</rss>

