Detecting iPhone 5

iphone 5 sugartin xcode detect

Attempt to check if the current device is an iPhone 5 at runtime. The most advanced version of this I’ve found is from this answer on StackOverflow. The following is a slightly modified version of the macros created in the StackOverflow … Continue reading

Handle Tap On UILabel event / UIGesture on UILabel

xcode_hammer_build_blueprint_tool

Step 1. Add UILabel dynamically or using interface builder into your view. Step 2. Put following lines of code for handling Tap On UILabel.

Accessing Application Version into your application

sugartin accessing app version

  As illustrated in image above, Assume that you have to access & display the Application version name. Or While making a web-service call, you have to pass the version of the application, so that server can know, which version … Continue reading

UITextField numeric entries only

Numeric Keypad only

I am going to provide here snip for limiting a textfield to numbers only. Following code-snip will help you to enter 14 digit number like a phone number including brackets (), dash – , space and backspace.

Console only on Debug mode & not in release mode

Console during development mode

It is strongly recommended to console each thing during the development time of the application. But during the development time, developers also have to send the build to the end client. Its an obvious thing that, no one would wish … Continue reading

Console only on Debug mode & not in release mode

Console during development mode

It is strongly recommended to console each thing during the development time of the application. But during the development time, developers also have to send the build to the end client. Its an obvious thing that, no one would wish … Continue reading

MultiLevel Parsing using DOM parser – TouchXML

TouchXML for Flickr API

Hello Everyone ! Using this post I am going to describe the most complicated parsing of complex XML data using TouchXML parsing method. Let’s have a brief idea. Say for example, if you have to parse following xml file. It’s … Continue reading

MultiLevel Parsing using DOM parser – TouchXML

TouchXML for Flickr API

Hello Everyone ! Using this post I am going to describe the most complicated parsing of complex XML data using TouchXML parsing method. Let’s have a brief idea. Say for example, if you have to parse following xml file. It’s … Continue reading