Friday, September 3, 2010

String Comparison in the iPhone SDK

November 30, 2009 by Josh Highland  
Filed under iPhone app dev, tutorials

xcode
The wrong way to do string comparisons in the iPhone SDK

if(myTitle == @"HELLO")

The right way

if([myTilte isEqualToString:@"HELLO"])
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • MySpace
  • Ping.fm
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!