Sadiqaadil has Published 15 Articles

How to get the distance between two geographic locations in iOS using Swift?

Sadiqaadil

Sadiqaadil

Updated on 11-Sep-2019 08:18:31

1K+ Views

In this post we will learn how to calculate the distance between two geo locations.We will show the distance between two points on a label.To do so follow the steps belowStep 1 − Open Xcode → New Project → Single View Application → Let’s name it “FindDistance”Step 2 − Open ... Read More

How to programmatically prevent scrolling in WebView of iOS?

Sadiqaadil

Sadiqaadil

Updated on 11-Sep-2019 08:13:30

1K+ Views

Disabling scrolling in WebView in iOS is very simple.The ‘scrollView’ property of the WebView is exposed by iOS.You will just need to disable the scrolling of the corresponding scrollView using below code.webView.scrollView.isScrollEnabled = falseThe above code will disable the scrolling on WebView.If you were just looking to disable scrolling in ... Read More

How to check if a text field is empty or not in swift?

Sadiqaadil

Sadiqaadil

Updated on 11-Sep-2019 07:57:25

3K+ Views

It’s very easy to check whether text field is empty or not in Swift.You will first need to check whether text is available or not in text field i.e. it’s not nil, then you will need to check if its present then its empty or not. Assuming myTextField is your ... Read More

How to add a border to the top and bottom of an iOS View?

Sadiqaadil

Sadiqaadil

Updated on 11-Sep-2019 07:52:04

4K+ Views

In this post we will learn how to add top and bottom border to view.In this example we will take as sample view and add borders to it.Step 1 − Open Xcode → New Project → Single View Application → Let’s name it “AddBorderTopAndBottom”Step 2 − Open Main.storyboard add a ... Read More

How do you animate the change of background color of a view on iOS?

Sadiqaadil

Sadiqaadil

Updated on 11-Sep-2019 07:47:17

1K+ Views

In this post we will learn how to change the background color of view with animation.In this example we will change background color of view on click of a button. On clicking the button the background color will change to red, then on next click it would change to blue, ... Read More

Advertisements