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

Objective-C or Swift: Which Technology to Learn for iOS App Development?

  Introduction   It’s no argument that mobile platforms are kicking desktop computers out of the limelight and according to the most recent statistics, these will gain a significantly greater offer of the market in th...

Objective C or Swift - Which Technology to Learn for iOS Development?

Swift programming language is completely based on general purpose, a multi-paradigm compilation which has been developed by Apple Inc. Swift is basically developed for various operating systems including iOS, watchOS, macOS, Linux, and tvOS. It i...

Pass Data from One ViewController to Another in iOS Objective C

Hi, guys, today will learn how to pass data from one view controller to another in iOS 1. First & foremost you have to analyse the type of data that is in your first ViewController that you have to pass ahead to the next view controller. ...

Convert Hexacode to UIColor in objective c

To convert the hexacode to color we can create a category of UIColor and implement the following code - it will return the code corresponding to that hexacode Hexa code can be in following format 1- #RGB 2 -#ARGB 3- #RRGGBB 4- #AARRGG...

Pusht to new ViewController with top to bottom animation

Hi, Normally when we push to a ViewController it show the animation from left to right. But we can change this to animation from to top to bottom. here is the code to push a view controller from top to bottom. - (void)pushFromTop:(U...

How to add records into Firebase in iOS sdk?

Hi Readers, Many developers use third party SDK for saving records into the Database, Firebase provides us this functionality. To add records into Firebase, please follow these steps: First of all, you need to create a reference to Firebase...

How to Display banner ads for DFP users in ObjectiveC

This blog includes how to display banner ads for DFP users.For this first user need to signed up as a DFP (Double click for publisher) and then install cocoa pods for Google mobile ads. pod 'Google-Mobile-Ads-SDK'   We can also in...

Generate random number without repetition in ObjectveC

This blog includes generating the random number without repetition of number in specific range. For this we need to take a array to store the generated number so that we can keep track that the number is already generated or not. Here is th...

How to get the image size after aspect fit in objectiveC

When we set the aspect fit property of image view then the size of image get reduced because it sets the image according to the aspect ratio.  So if we want to get the size after aspect fit the use the following code- In the following cod...

How to animate view zoom and bounce like popup in objectiveC

This blog includes zoom and bouncing In animation on view. If we want to present view like popUp alert then it include two animation- first is zoom and second is bouncing.These two animation can be achieved by affinity transform.Scaling, rotat...

Clear view or image with touch in iOS

Hi Readers, Paint related apps are usually used to clear content what have been drawn. One can achieve it by using Core Graphics framework provided by iOS. With touch delegate methods will be called so following code snippet will give prope...

Play video within given frame or in UICollectionViewCell/UITableViewCell

Hi Readers, Usually we have scenarios for playing videos within the app. MPMoviePlayerController will be used for that. But you can see MPMoviePlayerController deprecated in iOS 9 and later. So we need to put our focus on AVPlayer now. With AV...

How to play music in the background using AVAudioplayer

Hi Readers, Many times we need to play music even app is in background. It is normal behavior of AVAudioPlayer to play sound when app is in foreground or active state. But to play sound, music or song even in background state can be achieved b...

Customizing search bar in iOS SDK

Hi Readers, Customizing search bar can be easily done with UISearchBar. All you need to check view hierarchy of search bar subviews for that as with latest iOS SDK hierarchy can get changed. Customizing can be done by changing these views colo...

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...

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...

Saving secure data into keychain wrapper for app security

Hi Readers, The keychain service provide a secure way to store content such as passwords, keys, certificates, etc. Each iOS app has a separate requirement to save items. There is a class named KeychainItemWrapper which provide you service to s...

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 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 ...

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 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 ...

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...

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 ...

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...

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...

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. ...

How to create a UIPopoverView programmatically in iOS 9

To create a popover view  Go to your storyboard, set a button in view controller(on click of this button we will pop a popover view).   Make an IBAction form this button to your view controller eg:- (IBAction)popoverBu...

How to use NSAttributedString in UITextView?

We can use attributed string with textView by following steps -   1. Make a IBOutlet of your textView for eg - @property (weak, nonatomic) IBOutlet UITextView *textView;   2. Now go to storyboard and select your textVi...

How to set UICollectionView right align?

Hi Readers, This blog will display the collection view content in Right To Left language such as Hebrew/ Arabic. Generally, you will see the collection view as displayed in the below screenshot. To set UICollectionView right align first...

How to create marquee effect on imageview in Objc

To create marquee effect first set scroll view either via storyboard or via code Here in this example I am setting up scroll view via code. declare these variables     UIScrollView *scrollView;     NSTime...

UiSplitView Controller in Swift

To Create a SplitViewController in swift follow the steps:- 1- Create a new Project. 2- Add a splitViewController. 3- Create a cocoaTouch Class inherits from UIViewController named as DetailViewController 4- Create another CoCoatouchC...

Make Paypal Payment in iOS

To Integrate paypal in iOS App use the steps below: 1- Install Pod for paypal platform :ios, '6.0' pod 'PayPal-iOS-SDK' 2- #import <PayPalMobile.h> to your viewController.h and also set the delegate in .h @interf...

Share text on whats app in iOS

Opening whatsapp:// URL with one of the following parameters, will open whatapp and perform a custom action like sharing of text:- 1- Add whatsapp in LSApplicationQueriesSchemes to your info.plist 2- Message will be diplayed as M...

Blend Image in IOS

if you want add the custom frame on image like a border then 1- Add the GPU image Third party library to your project . 2- Use the image with imagename that you want to use as border image of originanl Image. 3- Framed image will the out...

How to shuffle an array

Hi all, Shuffling an array means randomly re-arranging the content of an array .Shuffling algorithm can be used in many places now days like in card games, music player , media player etc. Shuffling of an array can be done in two ways. ...

How to create Triangular imageview in objective C

Here is the code for creating the triangular uiimageview - UIBezierPath *bzrPath = [UIBezierPath new]; [bzrPath moveToPoint:(CGPoint){0, self.imgView.frame.size.height}]; [bzrPath addLineToPoint:(CGPoint){80, 0}]; [bzrPath...

Fetch the poi from google in ios

To fetch the poi from google we can use the GOOGLE API to get the list of POI near user location. 1- For creating the Key you can get the refrence from Link : https://developers.google.com/maps/documentation/ios-sdk/get-api-key#overview ...

How to get time intervals in hours between start time and end time in objective C

If we want to get the time intervals between the start time and end time then use the following code- it will return the array of hours according to the start time and end time. + (NSMutableArray *)getTimeIntervals:(NSString *)startTime a...

Change the Flash mode of camera in ios

To set the camera flash on or off in ios  Use the code below: -(void)setFlashMode:(AVCaptureFlashMode)flashMode forDevice:(AVCaptureDevice *)device { if ( device.hasFlash && [device isFlashModeSupported:flashMode] ) { ...

Image is Blurred after cropped from a view

if you are going to take a snapShot of  a view in ios and resultant image is blurred please change your code to following.   CGRect rect = [ScreenShotView bounds]; UIGraphicsBeginImageContext(rect.size); Please change thi...

Take the ScreenShot of View with Tabbar & NavigationBar

To Take the screen shot Of a view with navigation & tabbar You can use this code: -(UIImage *)getImageWithNavigationBarInIOS { CALayer *layer = [[UIApplication sharedApplication] keyWindow].layer; CGFloat scale = [UIScre...

Parsing JSON objects using Mantle framework in Objective C

Hi Readers, Mantle is latest and reliable framework which we can use while parsing JSON objects coming from server end. We can do this by simply initialize a class of type MTLModel. We can understand framework working with following example...

UI Objects not visible in storyboard when changing height and width specifications

You may often come to a situation when your UIObject(say UIImageView) is not visible on storyboard. It may be because you’ve dragged and dropped the UI Object for specification(say Regular Width - Regular Height) other than Any-Any. &...

How to get Image Filters in Core Image framework

Hi Readers! Many times we need to check what Core Image filters do we have in iOS framework. Here is a simple code to get all the list of filters with their attributes. This will be easier for you to check and apply any filter on an image.&nbs...

How to launch Apple Maps from iOS app

Hi Readers! Below is the code to launch the Apple Maps application and display the directions between 2 points on Map. Example 1: Display directions MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2...

Array of dates between two dates

Hello Friends, To create an array of dates between two dates you may use the following code: 1.Create an NSMutableArray NSMutableArray *datesArray = [NSMutableArray new];   2.Set the date formatter according to your requi...

DIFFERENCE BETWEEN C , C++ AND OBJECTIVE-C

Below are some important difference between C , C++ AND OBJECTIVE-C C is a procedural language. C++ is procedural as well as object oriented programming language. Objective-C is a general-purpose, high-level, object-oriented programming lan...
prev 1 3
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: