How to use Cocoapods in Swift Programming language

Cocoapods is a dependency manager for Swift projects. It simplifies importing third-party libraries to the project and it handles dependencies. In this tutorial we will import the FontBlaster library using cocoa pods. The FontBlaster library makes it easy to use…

How to create Simple Registration form in SWIFT !

A form which we may use in multiple applications but each time that is Sign up or Registration form. Below is the sample code of simple registration form Below form contains the fields like -First Name -Last Name -Email -Password…

IOS 8.4 Features !

Revamped Music app - iOS 8.4 introduces a new look for the Music app with a revamped design that shows pictures of artists in the Artists view and offers personalized playlists. It also offers a new MiniPlayer, a redesigned look…

Top-Most Swift Interview Questions

1) Explain what is Swift Programming Language? Swift is a programming language and system for creating web applications in iOS and OS X. It is an innovative programming language for Cocoa and Cocoa Touch. 2) Explain how you define variables…

How to use RSS Widgets in wordpress !

There are two built-in WordPress RSS or Feed Widgets. The RSS Links displays a list of the links to various core WordPress feeds on your site for Posts and Comments. The RSS allows you to integrate an external feed source…

How to apply style to wordpress widgets !

Styling the Text Widget Standard 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 id="primary" class="sidebar"> <ul> <li id="text-1"…

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 to provide a…

How to read data from property list file (.plist) to NSDictionary in IOS.

  - (NSDictionary *) dictionaryWithPropertyListAtPath: (NSString *) path { NSString *error = nil; NSPropertyListFormat format; NSData *plistXML = [ [NSFileManager defaultManager] contentsAtPath: path]; NSDictionary *result = (NSDictionary *) [NSPropertyListSerialization propertyListFromData: plistXML mutabilityOption: NSPropertyListMutableContainersAndLeaves format: &format errorDescription: &error]; if (error !=…

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 it to get carrier name. First method…

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) object) with a couple…

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…

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 should…

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 *contactDB1; @interface mysingleton : NSObject { //DATABASE STARTS NSString *databaseName; NSString *databasePath; sqlite3 *contactDB;…

Check for an active Internet Connection on iPhone SDK !!!

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 Reachability.m to the project (found…

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 - (void)viewDidLoad { [super viewDidLoad]; timer_time_taken = [NSTimer scheduledTimerWithTimeInterval:(1.0) target:self selector:@selector(time_taken_Ticker) userInfo:nil repeats:YES]; } -(void)time_taken_Ticker { NSLog(@"Timer=%d",[mysingleton sharedInstance].timer_seconds);…