Posts

Showing posts with the label ios tutorial

Web View Using WKWebView iOS Tutorial

Image
WKWebView iOS Tutorial Hi, In today's post, we'll learn how to use WKWebView or simply saying, how to implement web view in iOS applications . I am using Xcode 9 and Swift 4 for this tutorial. So, let's do it using our step by step approach: STEP 1: Open Xcode and create a Single View Application. Give some name to your app, eg. WebViewAppTutorial and make sure to choose Swift as the language, click Next. STEP 2: Here, first we'll embed our app in a navigator controller. For this, just open your Main.storyboard and click on View Controller. Now, select Editor from Xcode Menu bar, and select Embed in > Navigation Controller. STEP 3: Now, open ViewController.swift file and import webkit module. import  WebKit Under your ViewController class , add the webView property as: var webView: WKWebView ! Now, in your class declaration, add one  WKNavigationDelegate  protocol as shown below: class ViewController: UIViewController , WKNav...

Twitter Login Integration In iOS Using Swift

Image
Twitter Login Integration In iOS Using Swift Hi, In this post, we'll learn how to integrate Twitter SDK in iOS apps. Its pretty simple and easy to implement Login using Twitter in iOS applications. You can learn it just by going through this post only once. I hope you'll like it! FYI, we can use twitter login in 2 ways in our iOS applications. One is using default Twitter Login Button and second one is using our own custom button for twitter login . In this post, I'll guide you through both the twitter login methods. Without any delay, let's start with our project setup. Again, we'll accomplish our goal by following a step by step approach as mentioned below: Setup Xcode Project Install Twitter Pods Create App On Twitter Apps Dashboard Write Some Code Run Our App STEP 1: Setup Xcode Project:  First of all, open your Xcode project and create a single view application. Give some name to your project and click Next. Here, if you want to use Twi...

How To Parse JSON Data In iOS (Swift 3 + Xcode 8) ?

Image
JSON Data Parsing In iOS Hi, In this post, I'll show you how to fetch and parse JSON data from an URL in your iOS app. First, what is JSON?? JSON stands for "JavaScript Object Notation". JSON is the most popular and light weight format for data-interchange.  In this app, we’ll use http://fixer.io website's API to get the latest currency exchange rates and use them in our iOS app.  So, let’s start and see how to parse JSON data in iOS. First of all, open your Xcode and create a Single View Application.  Give some name to your project and make sure to choose Swift as the language. Click Next. For this post, we don’t need to work in Storyboard. So just open your ViewController.swift file and write following lines of code in your viewDidLoad() method:      override func viewDidLoad() {         super . viewDidLoad ()                  //Give your...

How To Show Alert With Action In Xcode Using Swift ?

Image
How To Show Alert With Action In Xcode Using Swift Hi, In this tutorial, I’ll show you how to create alerts for your iOS apps. Alerts are very common in iOS apps and requires almost in every app here and there. Alerts are also very easy to implement in Swift. You can learn it just by going through this post only once. So, let’s start and see how to create alerts for your iOS applications.. FYI, You can also watch this tutorial on my YouTube channel here:  How To Show Alert With Actions in iOS                 First of all, open your Xcode and select Single View Application, click Next. Now, give some name to your project and make sure to choose Swift as the language.  Once you're in the project editor, open your ViewController.swift file.  Here, first we’ll create a function for setting up our alert and then we’ll call this function in our viewDidLoad() method. So, to create this func...