IOS 8

Allow only numbers in the UITextField – IOS Tutorial

Introduction to how force UITextField to accept numeric values in ios: Validations are important in IOS app development that includes user input. Sometimes we, need only numeric values to be entered into the UITextField. In this post we will look at the code that helps us in achieving our requirement to allow only numbers in […]

Allow only numbers in the UITextField – IOS Tutorial Read More »

Add custom event in iPhone Calendar in swift

Programmatically add custom event in the iPhone calendar One can use EventKit.framework to programmatically add custom event and add alarm to created events in iPhone calendarfrom within their apps. In this post, we will learn to create event in iPhone calendar programmatically from our IOS app. First add EventKit.framework to your project as shown in

Add custom event in iPhone Calendar in swift Read More »

Keep tab as selected UITabBarController

  Recently, I came across a situation where I have to  force a current selected tab to remain selected in UITabBarController, when user select or tap a different tab. So i though worthy of sharing the code with all the community. To make this happen, one can use UITabBarController delegate – (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController

Keep tab as selected UITabBarController Read More »

Calculate number of days between two dates

Tags: #Number of Days #Between Two dates   #IOS  Below is the code snippets that allows to get the number of days between one particular date to another particular date. + (NSInteger)daysBetweenDate:(NSDate*)fromDateTime andDate:(NSDate*)toDateTime {     NSDate *fromDate;     NSDate *toDate;          NSCalendar *calendar = [NSCalendar currentCalendar];          [calendar rangeOfUnit:NSDayCalendarUnit startDate:&fromDate   

Calculate number of days between two dates Read More »

Printing documents from app programmatically

Printing from IOS device can only be done using Air-printer. There is very simple code provide by Apple Inc., to let developers initiate direct print command from their apps. In this post we will learn about printing documents from IOS app programmatically. We can use UIPrintInteractionController class for printing documents programmatically from IOS app. Below

Printing documents from app programmatically Read More »