Category Archives: Xcode

How will you create a static library in iOS?

By | September 27, 2015

What is a Static library? A static library or statically-linked library is a set of routines, external functions and variables which are resolved in a caller at compile-time and copied into a target application by a compiler, linker, or binder, producing an object file and a stand-alone executable. This executable and the process of compiling… Read More »

Create a date in your format in IOS

By | December 31, 2014

Below functions takes the current date and time and formats it to give a date-time string. You can customise it in the way you want. The string that the below function generates will be like this – 23-Dec-2014 4:23 PM Use “MMMM” for “December” and “MMM” for “Dec” in month.

Creating a Custom Alert or PopUp in iOS

By | November 15, 2014

First we will write a class that extends UIView to create a Custom PopUp Create a Cocoa file and name it CustomPopUp You should get two files CustomPopUp.h and CustomPopUp.m CustomPopUp.h CustomPopUp.m I have a sample interface like this. Now the ViewController.m MAKE SURE YOU HOOK UP THE BUTTONS TO THEIR CORRESPONDING FUNCTIONS. You can… Read More »

Handling Files in iOS

By | October 29, 2014

Hi All, In Todays article we will see how we can handle files in Objective C. The list of the methods used for accessing and manipulating files are listed below. Here you have to replace the FilePath1, FilePath2 and FilePath strings to our required full file paths to get the desired action. Comparing two file… Read More »

Delegates in iOS – A Simple Example

By | October 26, 2014

Hi All, Today I am going to talk about iOS Delagates. This example shows how to write a common delegate for a mail composer in iOS. First I am going to crate a seperate class for invoking the MailComposer Modal view controller. The class is named “Common”. So Create .m and .h files for Common.… Read More »

How to download an image from a URL in Objective C iPhone?

By | February 15, 2014

This method downloads the image from the specified URL and stores in the documents directory and then shown in an ImageView. Make sure you have an imageview linked with the outlet in the UserInterface. Please leave your comments if you found this code useful.

How to create a radioGroup in Android inside a Scrollview?

By | February 14, 2014

Here is a sample code that creates a radiobutton group inside a scrollview. Please make sure you have a scrollview in your UI and its linked. // This function adds the radio buttons inside the scrollview. Here I am using some of my variables to generate the count of radio buttons. Please make sure to… Read More »

How to call a function in background in Xcode(iPhone)?

By | January 5, 2013

“performSelectorInBackground” will call anyfunction to execute in background and you can also pass string parameters with this method or if you want to pass more params then pass the parameters as an object. [self performSelectorInBackground:@selector(myBackgroundMethod:) withObject:@”String Params”];