Asynchronous Operations in iOS with Grand Central Dispatch
Some times while you read the news from any news app the images related to that articles downloads slowly but before that you can read the news articles, this can be possible by using multiple thread operation using GCD Grand Central Dispatch, or GCD for…
How to read data from property list file (.plist) to NSDictionary in IOS.
Read data from property list - (NSDictionary *) dictionaryWithPropertyListAtPath: (NSString *) path { NSString *error = nil; NSPropertyListFormat format; NSData *plistXML = [ [NSFileManager defaultManager] contentsAtPath: path]; NSDictionary *result =…
How to get carrier name in IOS ?
CoreTelephony framework contains routines for accessing telephony-related information (available since iOS 4.0, more information here). CTCarrier class allows you to get some useful information about the user’s home cellular service provider. Let’s use…
Generate unique identifier in IOS !
Sometimes it could be quite useful to have a function that generates unique identifiers. Unfortunately iOS SDK doesn’t have method that simply returns identifier as a string. You should use CFUUIDCreate (returns Universally Unique Identifier (UUID)…
How to check that device is iPhone 5
There is no function in iOS 6 that can tell us that app is running on device with tall screen. So we have to check device’s screen size manually. + (BOOL) isTallScreen { CGFloat height = [UIScreen mainScreen].bounds.size.height; CGFloat scale = 1;…
Create your own custom loader UIActivityIndicatorView
Ever wanted to have your own custom loader view instead of iOS’ default spinning circle? If what you want isn’t very complicated, you could probably achieve it very easily using UIImageView’s animationImages property. The catch is that your animation…
How to call global method with parameters or arguments in IOS !!!
How to call global method with parameters or arguments in IOS //SINGLETONCLASS.H #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import static NSString *databaseName1; static NSString *databasePath1; static sqlite3…
Check for an active Internet Connection on iPhone SDK !!!
Internet Connection on iPhone METHOD 1: Use a simple (ARC and GCD compatible) class to do it 1) Add SystemConfiguration framework to the project but don’t worry about including it anywhere 2) Add Tony Million’s version of Reachability.h and…
How to use NSTIMER in IOS Programatically ?
////sample.h #import <UIKit/UIKit.h> @interface sample : UIViewController { NSTimer *timer_time_taken; } @property (nonatomic, retain) NSTimer *timer_time_taken; @end ///sample.m #import “sample.h” @implementation sample –…
How to move UP the UIVIEW when keyboard is display or typing in UITEXTFIELD in IOS !!!
UIVIEW when keyboard is display In my recent project i have faced a small problem when i have to provide data through UITEXTFIELD , but the problem is that after 4 UITEXTFIELD rest of the UITEXTFIELD’s are hide behind the keyboards, so the simple…