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

Get location from postal code in Swift 3.0

1. import coreLocation in your controller. import CoreLocation 2. Add this function to your view controller. func getLocationFromPostalCode(postalCode : String){ let geocoder = CLGeocoder() geocoder.geocod...

Swift: Get clicked image by camera

Hi All, Sometime we have to take a picture using camera and use that image , we have to follow these simple steps.   1) Ask permission to access camera and microphone. Add these key and value in your project plist:- <key>...

Choose Image from gallery

Hi All, Sometime we have to pick an image/video from device gallery and to open gallery/photos of your device and pick any image , we have to follow these simple steps.   1) Ask permission to access user gallery. Add these key and v...

Hide Status bar in iOS

Hi,   If you want to hide status bar in your application then do following steps to achieve:   1- Go to info.plist file provided in left panel of your application. 2- Add a new key with name “View controller-base...

How to login with Facebook in swift 3.0

To Implement Facebook login in swift 3.0, we can use following steps. 1. install pod pod 'FacebookCore' pod 'FacebookLogin' 2.Register your app on the Facebook  developer account. After registration,Go to you info.plist, right ...

Convert NSDate from local timezone to UTC and vice versa in Swift 3.0

1. To convert UTC(Coordinated Universal Time) to Local timezone func convertToLocalDateFromUTCDate(dateStr : String) -> String { let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd HH:mm:ss Z" let...

App Group capability of iOS

Hi All, In iOS, AppExtension and its containing application and groups of application use App Groups capability to share data between them. For example if keyboard extension app want to share data with its containing application. Using app ...

Handling Click Events On SKSpriteNode

Hi,   Like UIButtons we don’t have IBActions for SKSpriteNode and what if we have to trigger the click event on SpriteNodes. Solution comes here by handling touch methods provided by UIResponder class. Start by creating a subc...

Unit testing of swift project - User experience (UX)

Hi All, In iOS , We have two type of testing one is UI testing (User interface) and UX testing (User experience). In this tutorial we will learn UX testing of an ios app. User experience (UX)  is the internal experience that a person h...

Convenience Initializer in Swift with Example

Convenience Initializer used in swift as a supporting initializer. By using the convenience initializer you can put multiple -init along with other and use whichever you want to use.   convenience initializers have the convenience keyw...

How to Integrate Google Login in iOS App Using Swift?

Login with google is very common functionality in iOS applications. We can Implement google login in swift 3.0 either by using pods or google SDK. We need to install the following pod- pod 'Google/SignIn' Then register your app on the ...

Install CocoaPods and Dependencies in Swift

Hi,   CocoaPods is a dependency manager built on Ruby. It has thousands of libraries and more than a million of apps which helps to scale our project in a graceful and stylish manner. It saves a lot of time when dealing with various de...

Email Password Validation

Hello Coders, It’s always a need to validate email at user end. Not only this but strong password is also suggested to secure accounts. Here are snippets to validate if correct email and strong password are entered or not.   ...

iOS iMessage emoji Animated Stickers Pack Application for iPhones - Apple

  iOS provides a richer way to express feelings via iMessages using various stickers. And most interestingly these stickers are not limited, one can build their own stickers too and submit it to iTunes stores like other apps. Here I&...

How to Add Custom Vibration Pattern Programatically

Im trying to implement custom vibration pattern programatically inside my app.kindly suggest any sample apps/ source codes  which we can add the custom vibration pattern inside code.I am able to bring the default vibration inside by adding t...

How to store user information in NSUserDefaults in swift language?

Hi Reader’s, This blog includes the concept of how to store user information in NSUserDefaults in swift language. Below is the code in swift language for the same:-   import UIKit import Foundation class RegisterViewCont...

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

Launch Date Apple iPhone 7 Confirmed: Here are Some Expectations, Forecasts and Rumors

Its official and it's out - The iPhone 7 will be launched on September 7. Apple has put an end to all the rumours that circulated over the launch of iPhone 7 series. Apple sent out the media invites confirming the time and date of the mobile ...

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

Bounce effect on View

iOS has integrated full physics engine to UIKit. Which not only integrate physics-related capabilities but adds smooth and fascinating animations by using underlying iOS Physics engine and provided dynamic items what we send in API. One can use t...

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

Providing Extra padding in UITextField

UITextField is an editable area where one can use to get input from user using keyboard. We often come to a situation where extra padding is required from the left or right depending on requirement. Padding is already provided by UITextField...

Most Popular Application Development Frameworks 2016

      "Developing mobile applications used to mean that you had to write native code, for each individual device or operating system that your client required. However, these past few years the term Hybrid App Deve...

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 Interactive Worksheets Help Your Kids Learn Smartly & Funny Way

Being a parent you must be worried about your kids’ education and finding new ways to help them learn and grow! After all, your kids are your greatest assets for whom you do everything. To keep this in mind you have to find a better solutio...

Copy Paste in Swift

Apple provides the UIPasteboard class which  enables the data to be shared within the app and with another app. To share data we can use pasteboards. Here is the code snippet depicting how copy and Paste functionality can be achieved in...

Animating images in ImageView

 ImageView can be used for animation with a set of multiple images using various properties offered by apple.   Here are I’m going to tell you steps to animate images in ImageView:   1- Initialise an array of UIIm...

NetworkReachability Listener in Alamofire

Alamofire provides a method to check network status reachable on WWAN, Ethernet and wifi. The NetworkReachabilityManager class provided by Alamofire listens whenever there is a change in network. It can be used to determine background informat...

No Selection in interface builder

With Xcode4.0 and onward(including XCode7.x) we occasionally come across an issue in interface builder which happens while working. The Attribute inspector in Interface builder says “No Selection” although you’ve object/ele...

Update location in background after specific interval of time in objecticeC

This blog includes updation of location while your app is in background mode. Sometimes we need to fetch the user location while the app is in a background. To achieve this first we need to use the location manager.   Here is the code ...

Creating SubDirectory using XCAssets

Sometimes we need to be more generic about naming convention of images. We may need same name of assets(images) for various views. Xcode doesn’t allow us to keep the files with same name and can throw error or change the asset name by it...

Function inside a function

Functions are small modules or chunk of code. Swift’s function syntax is so flexible that it allows to write a function inside a function. Here is a syntax: func firstFunction(arguments) -> returnType{ func secondFunction(arg...

TextToSpeech API provided by Apple

Apple has provided a powerful api to play audio from text and here are the steps to achieve:   1-  Import AVFoundation framework   2- Initialise AVSpeechSynthesizer(as below) let synthesizer = AVSpeechSynthesizer() ...

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

How to fadeIn the selected cell of uicollection view in objective C

If we want to fadeIn the selected cell of collection view then use the following code- Sometimes we need to show the selected cell . For example - If we have list of songs and we want to display which song is currrently playing then FadeIn met...

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 crop the video from URL in objective-C

If we record the video from our app and need to crop that video in the square shape on any other specific frame then use the following code- In this code, we need the URL of the video that can be local URL because when we record any video it i...

How to create custom library in iOS?

Hi Reader’s,   This blog includes the concept of how to create custom library with the help of AssestsLibrary framework. Custom library is useful for multiple images selection at one time so given below is the screenshot of story...

How to set random numbers from an array as title of UIButton in iOS?

  Hi Reader’s,   This blog includes the concept of how to set random numbers from an array as title of different UIButton taken in story board. Random numbers are much needed if you are making a number based gaming applic...

Bottom pull to refesh for pagination in table view in Swift

Hi Readers, Pagination is required in most of our apps in today scenario. We can achieve it either pull to refresh from top or bottom. UIRefreshControl is the feature if you want to implement it from top side and insert processed records into ...

How to parse JSON in Swift with ObjectMapper

Hi Readers, Every app needs to parse JSON data coming from server and ObjectMapper is a powerful tool to achieve that. It can be easily done with provided pod which can be install by adding following line into podfile:  pod 'ObjectMa...

Blocks or closures in Swift

Hi Readers, We used to code blocks in Objective C, mainly to implement callbacks. For that particular functionality we can use closures in Swift. That will work same as blocks in Objective C. Closures are enclosed in curly braces { } and are d...

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

How to drag and drop UICollectionView cell item to another UIView in iOS?

  Hi Reader’s, This blog includes the concept of how to drag and drop UICollectionView cell item to another UIView with the help of long press gesture. First of all given below is the snapshot of storyboard in which collection ...

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 download videos from YouTube in iOS

Hi Readers, We can download video file from Youtube if we know youtube URL of the video. First you need to add attached files (HCYoutubeParser) into your project. Now you need to call following function into your code: let video = HCYout...

How to download data Using NSOperations and NSOperationQueue

Hi Readers, It is sometimes required to download files or images from server into local. We can perform these tasks by NSOperation and NSOperationQueue efficiently. The basic idea is to create each download operation separately and add these o...

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...
prev 1 2 7
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: