Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

How to decode HTML string coming from server to iOS readable string

Hi Readers, Many time we will get HTML content in our API response which we need to load into our component like UILabel.  We can convert this HTML content into normal string or more specifically NSAttributed string which we can set into ...

How to perform task in background thread using GCD

Hi Readers, GCD stands for Grand Central Dispatch. It can be used to handle background task. In app requirement many time we need to perform some tasks like calculation etc without any effect on main thread. So all we need is to perform that p...

Crash on camera open in iOS 10

Hi, If you app getting crash on opening camera in iOS 10, then you have to do some changes in your info.plist. To avoid the crash we need to add the suggested key to ‘Info.plist’ (Xcode 8 already contains the full list of possib...

How to implement autolayout programatically in iOS?

  Hi Reader’s, This blog includes the concept of implementing autolayout programatically. This can be done in two ways:- 1.NSLayoutConstraint Class 2.VisualFormat   Below is an example which includes a UITextField ...

Make a simple paint application in iOS

We all have seen a paint application in our PCs or laptops. So, here we are going to build a simple application which uses different colors to draw on the screen :-   Lets start with making the UI. Drag an UIImageView and UIView in the...

How to check metadata of an audio file in iOS

Hi Readers, The below code snippet will give you the meta data of an audio file. You need to add an audio file in Resource Folder. Once that is done use the below code. Let us also understand the code.   - (void)viewDidLoad { ...

How to have transparent view controller in iOS?

At times we might need to have a transparent view controller i.e to have contents of presenting view controller visible along with the presented view controller. One of such cases can be when we have to show some popup with bl...

How to show gif Images in iOS using FLAnimatedImageView

We can easily display jpg images in the UIImageView. We can also display .gif images which supports animations so there is need to add some extra elements to our project. So for implementing this first install this podFile to your project :-...

How to use MaterialDesignIconicFont in iOS

With the help of MaterialDesignIconicFont we can use icons as texts and set them on label or title of buttons etc. To include the font first download the attached Material-Design-Iconic-Font.ttf file at the bottom of this blog. ...

How to blur UIView in iOS?

Hi Reader's,   This blog includes the code which is used to blur UIView in iOS in a very simple way. This code can be used according to the need of the user to blur the UIView. Code is given below which includes how to blur UIView ...

Crop UIImage in iOS

Hello all ! To crop an UIImage in iOS the following code can be used :-   - (void)viewDidLoad { [super viewDidLoad]; [_originalImage setImage:[UIImage imageNamed:@"Scenery.jpg"]]; CGRect rect = CGRectMake(...

How to use tabbarcontroller and transfer data from one controller to another in iOS?

Hi Reader's, This blog includes the concept of TabBarController and how you can transfer data from one controller to another. TabBarController is use to manage different content view controller which you provides according to your need. He...

How to save and fetch data from Sqlite database

First include the sqlite file in your project. Then copy that file from bundle to documents directory as below and create Database method. -(void)createDatabase{ NSString *pathForDocumentDirectory =[self databasePath]; //define new path...

How to store image in cache in iOS?

Hi Readers, This blog includes the concept of how to store image data in a cache memory with the help of SDWebImageManager. First of all, we need to install pods in the application to use SDWebImageManager, after creation of pod file you need ...

NSPredicate in iOS

NSPredicate is a query language. It provides a natural language interface to define logical conditions. While working with large data sets, sometimes it is essential to filter the data. So, the filtering and sorting of data can be done with NSPre...

How to show animation with objects

Animation On x and y axis. If we want to show some moving object on X or Y axis then we can use following code. Here we have taken one view and give some colour to it. CABasicAnimation *animation = [CABasicAnimation animation]; anim...

How to save and fetch image data from documents directory in iOS

Hi Reader’s,   This blog includes the concept of how to store and fetch data from document directory. You can easily understand the concept with the help of code given below:-   ViewController.h #import &l...

Universal link in ios 9

Universal link in iOS9 is similar to Deep linking in that on tapping a link on a website the app is launched. But in universal link the app is opened directly without going through safari. It also works with the apps which make call to openURL: f...

How to use AFNetworking to make a server call in iOS

Hi Reader’s, This blog is to use  AFNetworking to make a server call with the help of API. Here we are using an API which includes GIF images and other related data. So below is the code used to get response from server. Before ...

Passing data using NSNotificationCenter

There are different ways for passing data between controllers in Objective-C. In this example we are going to use NSNotificationCenter for passing data from one view controller to another view controller. NSNotificationCenter is generally used to...

Adding Toolbar above keyboard

Hello Readers, To add a toolbar above the keyboard we may use the following code snippet. We will create a toolbar with the needed items and set as the input accessory View of the keyboard. In the below code we have added a done button on t...

How to save and fetch record from NSUserDefault in iOS?

Hi Readers, This blog includes the concept of NSUserDefault which is used to store a small amount of data in it. Now the question arises if we already have SQLite database to store data then why do we need NSUserDefault? The answer is other...

How to convert NSData to UIImage in iOS

Hi Readers, This blog includes the concept of converting NSData to UIImage with the help of a very simple example. Given below is the screenshot and code which is used to convert NSData to UIImage on button click. Snapshot of storyboard is g...

UIActionSheet in objective c

We can show the action sheet by using following code. In the below code we displayed the action sheet on button action.   - (IBAction)actionSheetButtonAction:(id)sender { UIAlertController *obj1=[UIAlertController alertControlle...

How to fetch data from SQLite in iOS?

Hi Readers, This blog includes the concept of how to fetch data from database after saving the data. You can go through with previous blog if you are not aware about  how to save data How to save data in SQLite. Now we will discuss the ...

How to display collection view cells based on screen width dynamically in iOS?

Hi Readers, In this blog we will get to know how to resize collection view cell dynamically and according to the screensize of iPhone. Here is a very simple code given below to perform this task in a very easy way. We will use a method insi...

LIVBubbleMenu for iOS

We can create animated and customisable bubble menu for iOS using LIVBubbleMenu. Here is a link from GitHub for the project https://github.com/limitlessvirtual/LIVBubbleMenu-iOS.   In the following example we are going to show bub...

How to save data in SQLite database in iOS?

Hi Readers, In this blog, we will discuss how to save data entered by a user in SQLite database. Before proceeding towards the saving of data into the database you should know how to create a database and tables inside SQLite database. ...

Send e-mail in iOS

Email application of iOS device helps in sending emails. We can compose Email using MFMailComposeViewController in iOS. A standard interface that manages the editing and sending of email message is provided by the MFMailComposeViewController cla...

How to share posts in Facebook by using SLComposeViewController in iOS

We can share post in Facebook by using following steps: Add one button on ViewController and give action to it. Import #import <Social/Social.h> Now in button action write following code. - (IBAction)facebookButtonAction:(id)...

How to share posts in twitter by using SLComposeViewController in iOS?

We can share posts in twitter by using following steps. First add one button on view controller and give action to it. import one in your project that is-> #import <Social/Social.h> Now in button action write following code->...

How to load a URL in WebView in iOS?

Hi guys, Today we'll learn how to load a URL in a WebView in iPhone. Go to Story-Board & drag Web view in your View Controller in which you want to open that URL or web address. Create its outlet in your View Controller as - IB...

How to find hours between two NSDate objects?

We can find the hours between two dates by using NSDateFormatter. NSDateFormatter provides formatting and conversion methods for NSDate objects. In below code, I have used formatter to convert the start date and end date into hours and minutes wh...

How to check if text is truncated in UILabel?

Hello all ! Sometimes it happens that the content is more according to the size of UILabel then the three dots appears at the end of the UILabel. So we want to show the complete text of the UILabel. We can implement it by adding a UIButton, on cl...

How to present a UIViewController from top to bottom in iOS?

When we present the viewcontroller it slides from bottom to top but, if we want to change the slide position then we have to use the animation for the UIView. By using animation we just change the frames of UIView.  If we want to present ...

How to display GIF images in view controller?

Hi Readers, In this blog, we will discuss how to display GIF images in view controller as GIF images are different from JPG images because GIF images include animation. We can easily display the images with JPG format by using UIImageView but ...

How to find the day of week?

Suppose we want to find the day of the week according to the given date i.e if we want to know the week day of a particular date then the following lines of code will help you to implement this :-   NSDate *date = [NSDate date]; //...

Convert NSDate into UTC

Coordinated Universal Time (UTC) is the standard time zone. All time zones are at some time ahead or behind UTC. If there is a need to convert timeZones of different countries then we can first change the local time to UTC and then to the desired...

How to find number of days between two dates

Below code is used to find number of days between two dates NSDateFormatter *startDateformatter = [[NSDateFormatter alloc]init]; [startDateformatter setDateFormat:@"dd-MM-yyyy HH:mm:ss"];//setting date formate NSDate *start...

How to scroll TableView to a specific position

  Hi Reader’s,   This blog includes the concept to scroll tableview cell automatically towards the top according to the condition provided and create index path according to the row and section. Here we will learn how t...

KeyboardWillShow and KeyboardWillHide

When we click on TextField  keyboard lifts up but if our text field is at bottom then we are not able to see it so with the help of NSNotificationCenter we can solve this issue. Add one TextField in ViewController, give bottom constraint ...

Date Filters in iOS

Hi, iPhone developers today we will see how to fetch records lying between 2 dates in iOS i.e basically applying date filters on records of data. The first thing we have to take care is the "format" of records we have in our database. ...

Subclasses in Objective-C

  Hi Reader’s,   In this blog we are going to discuss the concept of subclasses in Objective-C language. Subclasses are basically used to change the methods of an existing class or changes the behavior of properties we wi...

CNContactPickerViewController

CNContactPickerViewController is used to show contacts in TableView. It allows the user to select one or more contacts (or their properties) from the list of contacts displayed in the contact view controller (CNContactViewController).   ...

Glow UIButton titleLabel on selection of UIButton

Hi all ! If we want to show the glowing effect on the UIButton i.e when you are selecting the UIButton then the titleLabel will glow and when its not selected the titleLabel will again come to its original color. Here is an example which shows...

How to use .xib file for custom UITableViewCell?

Here is an example for creating custom .xib tableviewCell :-   Create a new file and when the window appears then first select USER INTERFACE from the menu appearing on left side and then select EMPTY file and create it. The .xib file ...

NSNotificationCenter

An NSNotificationCenter is used for broadcasting information within a program. It is like television broadcast where messages are broadcasted throughout the program. We can send the notification when some event occurs. For example, There is no...

Convert string into barcode image

Hi Readers, This blog includes a very simple example to convert a string into barcode image. As in one of my previous blogs I have explained how to read barcode with the help of iPhone camera and now in this blog I will explain how those barco...

PopOverView

PopOverView is used to show the pop up menu. To implement PopOverView first we have to embed navigation to the view controller and take one another Content view controller to show the popup data. Take one button in view controller and give acti...

REFrostedViewController

RefrostedViewController is used to show the side menu. For Refrosted View controller first we have to install pod ,we can install this version i.e pod 'REFrostedViewController', '~> 2.4’. We need one Root Controller i...
1 3 13
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: