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

How to call Objective-C class in Swift project using Bridging Header

Swift is faster than Objective-C and programmers prefer Swift for iOS development. Apple has aimed big goals with Swift but some programmers are still using Objective-C.     Here is an example of calling Objective-C code in...

Play Youtube Videos in Background Using Youtube iOS Player Helper/Custom Player

In this tutorial we will learn to create a custom Video Player that plays youtube videos in background also. To do that we will be using youtube-ios-player-helper.         Let's first know what yout...

How to Load an Image from URL with Special Characters in iOS Swift3

Swift#3 If an image URL contains special character which doesn't load image on image view then we need to do more than UTF8 encoding. We usually decode string using Unicode methods but sometimes it is not sufficient to encode special charact...

Get Value from textChange Without Using any Delegate Method of UITextField in Swift

In this tutorial we will learn to get value from textChange without using any delegate method of UITextField in swift.     let's see how: 1- We can achieve this using React, i.e. RxSwift 2- No need for textField d...

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

How to Load an iFrame in WKWebView Locally in iOS App

WKWebView, introduced in iOS 8 and OS X Yosemite which replaces UIWebView in UIKit and WebView in AppKit UI, it is used to open Safari browser outside the app. It loads web pages faster and more efficiently.     So, in...

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 Handle Location Services in an iOS Swift Application

iOS does not provide direct access to the location.We need to ask for the permission if we want to use the location in iOS. Asking for permissions depends on two factors: Asking for user’s location when app is running. Asking for us...

Basic Differences in Optional, Non Optional Value and How to Use Closures in Swift

In this tutorial, we are going to learn the difference between optional and non optional value in swift. We represent optional value by question mark i.e “?” and non optional value by exclamation mark i.e “!”.   ...

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 Capture Screenshot of Particular Screen Via Swift3 Application

Many a time we need to take a screenshot of a screen on an iOS device. So In this blog, we will discuss how to capture a screenshot of a particular screen through an application and with the help of an example this concept can easily be understoo...

6 New iOS Swift-4 Features for Better Programming Experience

Swift programming language is developed by Apple Inc for various operating system iOS, watchOS, macOS, Linux, and tvOS with easiness and advanced features to work on Swift. It is safe, having a modern approach, powerful, have many other features ...

How to Add Events to iOS Calendar in Your iPhone Device

To add an event to iOS calendar we need to access calendar of the iPhone without accessing calendar we can not add events in iPhone.   For accessing iPhone calendar we have to ask for permissions first. Here permission means allo...

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

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

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

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

Autolayout: Content hugging VS Content compression resistance priority

Hi All, We have properties to set content according to content length and device screen size which help us to manage user interface of an application. Content hugging priority and content compression resistance priority helps you to maintain U...

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

Learn Basics of Functions in Swift with Example [Video Tutorial]

Hi, Functions are chunks/module of code that can be reused in a program. Function in swift are unique and flexible enough to work with simple to complex style.  In this video we’ll be learning basics of functions, various function ...

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

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

Control Flow & Conditional Statement Video Example for Beginner - Swift

Swift provides various Control flow and Conditional Statements. Although these are similar to Objective C but with improved enhancements and usability. These statements can be used to check, iterate over various conditions and values. In this Sw...

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

Operators in Swift - Video Tutorial for Beginners

Hi, In this Video Tutorial on Swift Basic, we will learn about Operators in Swift. Based on fundamentals of C and objective-C,  Swift offers various operators to check, change, compare and combine value. These operators can b...

Swift Programming Basics for Beginner - A 10 Min Video Tutorial

As we all are aware that Swift is new programming language launched by apple for iOS, MacOS, WatchOS and TVOS app development. Although many parts of swift will be familiar to you if you've experience on developing in C and Objectiv...

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

Dictionary to JSON String

We often come across a condition where JSON string is to be sent to server. for example parameters like username & password is to be posted as JSON String for validating credentials from server. Best practice is to create an extension of N...

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

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

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

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