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 »
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.
The goal of @property directive in iOS is to create the getters and setters for that object so that you can access it in your program. It allows you to specify the behavior of a public property on a semantic level, and it takes care of the implementation details for you. This article also tells… Read More »
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 »
Hey everyone, Today we will see how we can use storyboards in an application. First we will Create a sample project named “StoryBoardDemo” Now we will Add the Navigation Controller For that Go To Menu -> Editor >Embed In -> NavigationController Now Double Click on the Title Bar and Add the title “Companies” Now Drag… Read More »
If you are trying to access a file (PHP or java) residing in your server in your own machine, then you have to use a specific IP to access it. If it is public, then use the other System’s IP 1. If it is localhost, In Android you use it as 10.0.2.2 The localhost refers… Read More »
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 »
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 »
Adding button action function.
This sample code generates a random number and checks whether its already present in the array. If yes then it will not add else it will add, thus generating a random array without duplicates. Please leave your valuable comments if you found this post useful.
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.
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 »
Here is a simple code that does this.. After splitting the string with “componentsSeparatedByString” the parts are added to a NSMutableArray using addObject.
“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”];
Unlike other UIViews, the UIWebview’s opaque property is set to true by default. That should be set to false for changing the background color.