Featured
-
How Regression Testing Detects Integral Errors In Business Processes
Humans are forever changing and evolving and so to
by kristina.rigina -
Get Display Banner Advertising Opportunity on FindNerd Platform
“Do you have a product or service that nee
by manoj.rawat -
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi
Tags
Flutter Vs. Swift: Consider the Key Differences to Choose the Best Language for iOS Development
An age-old battle between native and hybrid apps has blurred the lines between app development frameworks. For example, Flutter framework has gained ground as an option to Swift for developing iOS apps. Be it budget constraints or faster developm...
How to move between Two UIViews Independent of the ViewController in iOS
Before moving on to the topic, first of all, I assume you all are aware of Storyboards, segues plus traveling from one view controller to another. So going from one VC to another is okay what if we need to move between two UiView’s independ...
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...
Present ViewController with Transparent Background in Swift iOS App - Basic Steps
Sometimes we have to show a transparent View on a ViewController, For that we generally use .xib file and add them as subView in ViewController to show the transparency. But we can also give the transparency to view controller while presenting th...
How to Register Realtime User Information at Firebase in iOS App
Firebase is a realtime database where we can store the information and can check whether data got saved or not in Firebase. Here is a simple example of creating a project and connection of the project with Firebase, so, here we go.
...
How to Use Guard Statement in Swift iOS Application
Guard statement work as an error handler. If we have to send values to server which can be empty or may not be in that condition we can use guard so that if the value is nil then app will not get crashed.
let&...
How to Show UICollectionView in UITableViewCell Using Swift in iOS App
We can easily create a simple table view to show the data in tabular format but if we need to show UICollectionView inside the UITableViewCell then it become a challenging task for the beginners. So here is an easy tutorial, to get the concept of...
Slice an Image into Tiles and Store in an Array Using Swift iOS App
This is a small sample of how we can split an image into multiple pieces/tiles and store these small pieces into an array and further we will show, how these pieces are rearranged to form an image.
So let start with s...
Customize UITabbarController by Collection View for iOS App in iPhone Device
As we have noticed that iPhone/iPad tab-bar display maximum five tabs and if we have more than 5 tabs then only 4 icons are visible with 5th one displaying more option. In case we need to display more than 5 tabs without more icon we need to cust...
5 Easy Steps to Set User Notification Feature in iOS Swift Application
User notification is a new local notification feature in iOS. It gives the additional functionality i.e. to remove pending notifications which is not possible in UILocalNotification. So lets start how it works.
As we know for schedul...
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...
How to Implement Local Notification in an iOS Swift App in 3 Steps
Local notifications are used to inform the user regarding some activity in an app. In the local notification, we don’t need any server. It triggers by the app itself at the scheduled time.
In this tutorial, we will le...
Implement Face Detection Feature in iOS Swift Using Core Image Framework
In popular apps like Facebook, you may notice that while uploading any photo post, it automatically detects human faces. Everyone now knows that the face detection feature has become the hour of need for every Photo Sharing app.
With the face ...
Necessary Steps to Add In-App Purchase Feature In Your iOS Application
The purchases made by a user to get accessiblity of special features of an app such as add free app, confined levels or full game unlock, boosts etc and these feature can be acquired within a mobile app are known as In-App Purchases.
&nbs...
Easy trick to add an Event in the System Calendar using Swift 3.0
The EventKit framework allows the applications to access the calendar on iOS Devices. However, before accessing the calendar, we are required to import EventKit framework in our controller.
import EventKit
To add event...
How to Capture Screenshot in Swift
In order to take a screenshot of a screen and save the captured screenshot to library, use the below steps:
Add the "Privacy - Photo Library Usage Description" key to info.plist
 ...
How to Integrating Biometric (Touch Id) Authentication in iOS Application?
iOS 8 SDK by Apple provides Local Authentication API that allows developers to integrate Touch Id authentication in applications.
To integrate Touch Id authentication follow the below steps:
Import Local Authentication framework in your ...
Programmticaly Add AutoLayout by Visual Format Language in Swift
Auto layout adjusts the size and position of view according to the constraints applied to it. This approach dynamically changes our User Interface according to different screen sizes.
There are different ways for adding autolayout programmatical...
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...
Send Text Message in Swift
Hi,
Here we’ll learn how to send messages programatically in Swift. With the use of provided MessageUI framework we will implement message functionality in our app. This framework has MFMessageComposeViewController class which prov...
Send Email in Swift
Hi,
Here I’m exploring how to send mails programatically in Swift. Apple has provided MessageUI framework to implement mail functionality in your app. This framework has MFMailComposeViewController class which provides an inter...
Convert UIColor to Hexa Color Code
Hi,
If you want to get the HexaDecimal String code for any color then below code will surely help you to come out with the hexa color string.
Here are the steps to get hexa code string for any color.
1- Declare the va...
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...
Function Returning Function in Swift
Hi,
As we all know that Swift comes with new and variety of enhancements over objective C. Returning a function as a return type of a function is also one of them.
Here we are defining two functions which are accepting Int kind of...
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...
Generic Function in Swift
Hi,
Swift has a powerful feature of writing generic function as in Java which was missing in objective C.
It makes our code flexible and reusable for various types, meaning it can work with any data type. For similar logics and prob...
UINotification in iOS10, Swift 3.0
To implement Notification in iOS 10, follow below steps.
Go to Project -> Target -> capabilities -> push notifications
enable push notification.
Now in Your AppDelegate Class do following steps -
1. Import UserNotifications.
2...
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...
Making UIImageView Clickable Using UITapGestureRecognizer
Hi,
We all know that buttons has their own IBActions that can be drawn easily via xibs/storyboard and codes. But what if the view type is UIImageView or UILabel or any other.
In that case we can use UITapGestureRecognizer which is a...
Add InputAccessoryView in Swift for UITextField and UITextView
Hi,
Sometimes we need to show our custom accessory view when UITextField/UITextView is in editing mode or being edited. We can use inputAccessoryView property to assign a view just above the system keyboard.
Input accessory view is ...
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...
PopOver from storyboard
Hi,
Presenting popover from storyboard is easy and developer friendly. One can handle Popover from storyboard itself with a little code handling.
Following are the steps to present Popover from storyboard.
1- Draw an action seg...
Defer in Swift
Hi,
Swift has introduced a new keyword called 'defer'. Based on its meaning ‘defer’ puts off an action or event to a later time. It runs when the execution is about to leave the code block. You can use ‘defe...
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.
...
Rescale UImage to New Size
We may be using image sets where few images are pretty big or small in size(say big 500X500 for instance). And if you want to resize the image to your desired size then it’s easiest by creating an extension of UIImage that will draw the ima...
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...
Find Current month,Day,WeekDay from Date in Swift
Hi,
To get the current Year, Current month, Current WeekDay, and current day if the date you can use the following code.
To use this create a Extension of the NSDate and call the method with NSDate Object.
And call the method like CURREN...
Use Collection View in swift
Hi,
Step's required to use collectionView in Swift
1- Add collection View in your project
2- Set the delegate for collection view in controller
3- Collection view has a prototype cell, you can design accordingly you want.
4- Cr...
User default in swift
Hi ,
To use userDefault in swift we can use below code to
1- Save value in userDefaults for a key
2- Fetch value for a key
3- Remove value for a key
4- Remove all value
Here is the code -
//Save a value in NSU...
Add camera node in sceneKit
Adding Camera node provide us the point of view from which we view our scene. To add camera node we have to simply make the SCNCamera object and assign it to node’s camera property.
let ...
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...
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...