Posts

Showing posts with the label date and time ios

How To Fetch Date & Time In iOS Using Swift 3 & Xcode 8 ?

Image
How To Fetch Date & Time In iOS Hi, In this tutorial, I'll show you how to get the date and time in iOS apps using Swift 3 and Xcode 8. This is very useful to learn and you can easily fetch current date & time just by using a few lines of code. So, let's start and see how to get the date & time in Swift.. You can also watch this tutorial on my YouTube channel here:  How To Get Date & Time in iOS ? First of all, open your Xcode and create a Single View Application. Now give some name to your project and make sure to choose Swift as the language. So, once you're in your Xcode editor, open ViewController.swift file and add these lines of code in your viewDidLoad() method: override func viewDidLoad() {         super . viewDidLoad ()                  let date = Date ()         let calendar = Calendar . current     } Here, we're crea...