How to apply style to wordpress widgets !
Styling the Text WidgetStandard image alignment CSS styles such as alignleft, alignright, and aligncenter apply for images. To specifically style the various default styles of the WordPress Text Widget, use the following example: <div…
How to add widgets in wordpress theme !
WordPress Widgets add content and features to your Sidebars. Examples are the default widgets that come with WordPress; for post categories, tag clouds, navigation, search, etc. Plugins will often add their own widgets. Widgets were originally designed…
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 –…