<?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 Text Field (Newbie question) in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/text-field-newbie-question/m-p/352081#M3012</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys,i have next code, where answerText is UITextField&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; if (answerText.text == @"1")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"YES"); &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; else NSLog(@"NO");&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this code always returns NO when i type in textField "1" (in iOS Simulator),it returns YES only when i type in Xcode answerText.text = @"1",why?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Feb 2012 17:25:40 GMT</pubDate>
    <dc:creator>VladislavZagorodnyuk</dc:creator>
    <dc:date>2012-02-29T17:25:40Z</dc:date>
    <item>
      <title>Text Field (Newbie question)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/text-field-newbie-question/m-p/352081#M3012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys,i have next code, where answerText is UITextField&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; if (answerText.text == @"1")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"YES"); &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; else NSLog(@"NO");&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this code always returns NO when i type in textField "1" (in iOS Simulator),it returns YES only when i type in Xcode answerText.text = @"1",why?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 17:25:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/text-field-newbie-question/m-p/352081#M3012</guid>
      <dc:creator>VladislavZagorodnyuk</dc:creator>
      <dc:date>2012-02-29T17:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Text Field (Newbie question)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/text-field-newbie-question/m-p/352082#M3013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi guys,i have next code, where answerText is UITextField&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; if (answerText.text == @"1")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"YES"); &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; else NSLog(@"NO");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;this code always returns NO when i type in textField "1" (in iOS Simulator),it returns YES only when i type in Xcode answerText.text = @"1",why?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You're comparing pointers to two strings. Remember, @"1" is just a shortcut to create a brand new NSString object containing the single character '1'. Both strings *look* the same, but they are separate objects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead use isEqualToString: (see &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/isEqualToString:" rel="nofollow" target="_blank"&gt;Apple's documentation&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;if ([answerText.text isEqualToString:@"1"]) { &amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"YES"); } else NSLog(@"NO");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nick.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt;&lt;SPAN&gt; I just happened across &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOS/Introduction/Introduction.html" rel="nofollow" target="_blank"&gt;this road map from Apple&lt;/A&gt;&lt;SPAN&gt;, and &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOS/BasicTasks/AcquireBasicProgrammingSkills/AcquireBasicSkills/AcquireBasicSkills.html" rel="nofollow" target="_blank"&gt;this page&lt;/A&gt;&lt;SPAN&gt; seems particularly relevant.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 17:56:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/text-field-newbie-question/m-p/352082#M3013</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2012-02-29T17:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Text Field (Newbie question)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/text-field-newbie-question/m-p/352083#M3014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 14:01:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/text-field-newbie-question/m-p/352083#M3014</guid>
      <dc:creator>VladislavZagorodnyuk</dc:creator>
      <dc:date>2012-03-01T14:01:04Z</dc:date>
    </item>
  </channel>
</rss>

