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 »

Validate your INAPP purchase with APPLE server

Fraud, happened to so many app developers where in-app purchase never occurs with server and request was redirected to dummy server so that user can unlock in-app for free. Mostly happened in jailbroken devices that let app developer frustrated as in-app is the way to get some bucks in his/her pocket as app revenue.   …

Validate your INAPP purchase with APPLE server 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 »

UIScrollView with Autolayout – IOS tutorial

  In this post we will see, how to fix scrolling issues for UIScrollView with autolayout. Follow below steps to learn how can we fix scrolling issue with UIScrollView while using auto layout, to design our user interface in storyboard that contains UIScrollView with autolayout. Step 1: Drag UIScrollView to the view, add constraints to …

UIScrollView with Autolayout – IOS tutorial 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 »