Mohtashim M has Published 35 Articles

How to create Picker programmatically from array in iOS?

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 11:38:47

2K+ Views

A picker view displays one or more wheels that the user manipulates to select items. Each wheel—known as a component—has a series of indexed rows representing the selectable items.UIPicker is one of the important components and almost used in most of the applications. You’ll see them mostly in form-based applications.You ... Read More

How to dismiss the Alert with click on outside of the alert in iOS?

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 11:32:18

2K+ Views

Understanding and implementing UIAlert can be tricky especially if you’re new to iOS Development, In this post, we will be seeing how we can dismiss the alert when the user taps outside the alert box.For this demo, we will be using UIAlert class, to configure alerts and action sheets with ... Read More

How to change screen brightness programmatically in iOS?

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 11:28:09

920 Views

To change the brightness of the screen we have to use the brightness property of the screen, This property is only supported on the main screen. The value of this property should be a number between 0.0 and 1.0, inclusive.Brightness changes made by an app remain in effect until the ... Read More

How can I change the text color of the Navigation Bar on iOS?

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 11:22:16

564 Views

Changing the text color of the navigation bar is tricky and easy at the same time, In this post, we will be seeing how one can change the text color of navigation bar in swift.So let’s get started, Embed your view controller in Navigation controller as shown below and name ... Read More

How to get the dimensions of a view in iOS App?

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 11:07:57

764 Views

Getting dimensions of a view is easy, In this post, we will see how one can get the dimensions of a view in iOS.Let’s get started, Step 1 − Open Xcode and create a single view application and name it SampleView.Step 2 − Open Main.storyboard and add UIView as shown ... Read More

How to create a WebView in an iOS App using Swift?

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 11:02:01

6K+ Views

As an iOS developer, you will come across multiple scenarios where you have to display something in web, for that we use WebView.As per Apple, − It is an object that displays interactive web content, such as for an in-app browser.So in this post, we will be seeing how to ... Read More

How to obtain the phone number of the iOS phone programmatically?

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 10:53:37

1K+ Views

Getting a phone number of the iOS device is programmatically is not feasible. Apple doesn’t encourage it. You can get the phone number using private API’s but that will result in rejection of your application from the Apple App Store.As per the apple development guideline apps should be self-contained in ... Read More

How to change the font and color on the UITextView in iOS?

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 10:50:31

2K+ Views

Changing font and color on UITextView is simple, you just need to update the .textColor and .font property on UITextView object, Here we will be seeing how to do so.So let’s get started, Open Main.storyboard and add UITextView as shown below, Create @IBOutlet of UITextView and name it, textView.   ... Read More

How to change background color of TableView items on iOS?

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 10:43:34

2K+ Views

Changing the background color of table view items is different from changing the background color of the table view. New programmers may often confuse between these two things, In this post, we will be seeing how to change the background color of TableView items i.e. cells.So let’s get started.For changing ... Read More

How to create and use Global Variable in swift

Mohtashim M

Mohtashim M

Updated on 30-Aug-2019 10:41:04

3K+ Views

As per the Apple document – “Global variables are variables that are defined outside of any function, method, closure, or type contextBefore we learn how to create global variables, first let us understand completely what are they.Consider “W” which is inside the inner circle, can access everything which will be ... Read More

Advertisements