What is embedded bitcode and what does ENABLE_BITCODE do in xcode?

Vrundesha Joshi
Published on 21-Jan-2019 16:43:48
Bitcode – Bitcode is an intermediate reperesentation of how the code looks. This code can not be used by us or can’t be installed on a device. When we upload our application to the app store It is uploaded as an bitcode and later converted to app binary by itunes/Apple.When the ... Read More

What is "Processing Symbol Files" message in Xcode?

Rishi Rathor
Published on 21-Jan-2019 16:42:07
Processing symbol files is a message displayed on xcode when we create a project’s build. When this message appears, in background Xcode downloads files and symbol files for specific device and a specific processor on which build shall be installed.The symbol files contains debug symbols which are used to debug ... Read More

How to get the current version of my iOS project in code?

Jennifer Nicholas
Published on 21-Jan-2019 16:40:22
When we build an iOS application, by default it get a version 1.0 and build 0. Whenever we upload a new build to the app store, we need to change the version number. We can update the build number for testing builds. The version and build number are stored in ... Read More

Detect current device with UIUserInterfaceIdiom in Swift

Anvi Jain
Published on 21-Jan-2019 16:38:43
To detect current device with iOS/Swift we can use UserInterfaceIdiom. It is an enum in swift, which tells which device is being used.The interface idiom provides multiple values in it’s enum which are.case unspecified @available(iOS 3.2, *) case phone // iPhone and iPod touch style UI @available(iOS 3.2, *) case ... Read More

How to navigate from one view controller to another in iOS?

Vrundesha Joshi
Published on 21-Jan-2019 16:37:02
To navigate from one view Controller to another view Controller in iOS, we need to use Navigation controller. Navigation controller manages a stack of View controller when we go from one view to another view.Navigation from one view controller to another view controller can be done like mentioned below.Step 1 ... Read More

How to detect shake gesture using Swift?

Rishi Rathor
Published on 21-Jan-2019 16:33:25
To detect a shake gesture in iOS UIKit provides three different methods, let’s see them one by one.Method 1 − When the shake gesture begins.override func motionBegan(_ motion: UIEvent.EventSubtype, with event: UIEvent?) { // code you want to implement }Method 2 − When the shake gesture ends.override func motionEnded(_ motion: ... Read More

How to subtract 1 hour from current time using Swift?

Jennifer Nicholas
Published on 21-Jan-2019 16:29:47
To subtract hours from a date in swift we need to create a date first. Once that date is created we have to subtract hours from that, though swift does not provide a way to subtract date or time, but it provides us a way to add date or date ... Read More

Check if string contains special characters in Swift

Anvi Jain
Published on 21-Jan-2019 16:25:20
To check if a string contains a special character in swift we can use conditionals like if else or switch but that would need a lot of conditions to be executed, making programming as well as execution time consuming. So in this example we’ll see how to do the same ... Read More

Email & Phone Validation in Swift

Vrundesha Joshi
Published on 21-Jan-2019 16:21:58
To validate email and phone in swift language we can use multiple conditional statements like if conditions, but that’s a long process and may contain 50-100s of if statements to validate email.So instead of conditionals we’ll use Regular expression. Swift provides NSPredicates which we can use to evaluate a regular ... Read More

How to use Bold & Non-Bold Text In A Single UILabel in iOS/iPhone?

Vrundesha Joshi
Published on 21-Jan-2019 16:09:39
To use a Bold and a regular/Non-Bold text in a single UILabel, we can either use a storyboard editor to achieve the same, or we can do it programmatically. Let’s see both of them.Method One − Editing with StoryboardSelect the label you want to edit, go to it’s attribute inspector.From ... Read More