Mohtashim M has Published 35 Articles

How to enable/disable data connection in iOS programmatically?

Mohtashim M

Mohtashim M

Updated on 30-Jul-2019 22:30:26

272 Views

User can turn on or turn off mobile data from settings of an iOS device, but it’s practically not possible to disable or enable the same programmatically. It is only possible if you jailbroke an iOS device.. Apple does not allow any apps developer to access wifi or Bluetooth.There are ... Read More

Set Border for an ImageView in iOS?

Mohtashim M

Mohtashim M

Updated on 30-Jul-2019 22:30:26

972 Views

Setting border for image view is easy, In this post we will see how to set Border for an Image View in iOS.Let’s get started.Step 1 − Open Xcode → New Project → Single View Application → Let’s name it “BorderToImage”We will create an image view and a button in ... Read More

Where and how to use static variable in swift?

Mohtashim M

Mohtashim M

Updated on 30-Jul-2019 22:30:26

7K+ Views

Before we see where and how to use static variable, let us first understand, What is static variable in swift?Static VariableStatic variables are those variables whose values are shared among all the instance or object of a class. When we define any variable as static, it gets attached to a ... Read More

How to count number of characters in Text box while typing in iOS?

Mohtashim M

Mohtashim M

Updated on 30-Jul-2019 22:30:26

1K+ Views

As an iOS developer one should know how to manipulate with text field and it’s operation, Apple has already provided UITextFieldDelegate protocol.To read more about it https://developer.apple.com/documentation/uikit/uitextfielddelegateYou may have seen may application where forms are involved, and you see number of characters you’re entering when you type specially on the forms ... Read More

How do I prevent an iOS device from going to sleep mode?

Mohtashim M

Mohtashim M

Updated on 30-Jul-2019 22:30:26

1K+ Views

When most apps have no touches as user input for a short period, the system puts the device into a "sleep” state where the screen dims. This is done for the purposes of conserving power.Preventing iOS Device from going to sleep is easy, navigate to your Settings → Display & ... Read More

Advertisements