<?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: Copy a Graphic iOS in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/copy-a-graphic-ios/m-p/489122#M4176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Given you have an old graphic, you can encode to JSON and pass that to the new graphic, will create a copy using JSON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;AGSGraphic&lt;/SPAN&gt; *newGraphic = [[AGSGraphic alloc] initWithJSON:[oldgraphic encodeToJSON]];&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;Hope this helps&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;Cheers&lt;/P&gt;&lt;P class="p1"&gt;Al&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jul 2014 23:27:51 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2014-07-31T23:27:51Z</dc:date>
    <item>
      <title>Copy a Graphic iOS</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/copy-a-graphic-ios/m-p/489121#M4175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I make a copy of an existing graphic, make changes to the copy, and add it as a new feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AGSGraphic *newGraphic = oldGraphic;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;newGraphic setAttributes(whatever) also changes the attributes of oldGraphic, because of the pointer to a pointer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I just make a copy?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 21:33:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/copy-a-graphic-ios/m-p/489121#M4175</guid>
      <dc:creator>KyleDunaway</dc:creator>
      <dc:date>2014-07-30T21:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a Graphic iOS</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/copy-a-graphic-ios/m-p/489122#M4176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Given you have an old graphic, you can encode to JSON and pass that to the new graphic, will create a copy using JSON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;AGSGraphic&lt;/SPAN&gt; *newGraphic = [[AGSGraphic alloc] initWithJSON:[oldgraphic encodeToJSON]];&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;Hope this helps&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;Cheers&lt;/P&gt;&lt;P class="p1"&gt;Al&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 23:27:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/copy-a-graphic-ios/m-p/489122#M4176</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-07-31T23:27:51Z</dc:date>
    </item>
  </channel>
</rss>

