26 posts tagged with “mobile

How to get UIColor from Hex String in Swift

February 12, 2019

Many times designers will give colors in hex values and currently does not have an easy way to get the UIColor value of the hex string. A…

How to write code for the only the DEBUG build in Swift

February 09, 2019

One of the common things that you may want to do is run code that is only available in the development configuration. For example; a…

Fixing App Transport Security error in iOS

February 08, 2019

When making a network call, Apple demands that all networking calls are . Now what does that mean? Secure connections means at minimum that…

Easily pass data between Activities in Android

February 07, 2019

Android has this idea of in order to pass specific data between Activities. Intents are typically a little bit tricky to understand but…

How to pass data between UIViewController (Swift)

February 05, 2019

One of the simplest tasks in iOS is being able to pass data between View Controllers. The idea is very simple and easy to implement but not…

Removing elements in an array using Swift 4.0

February 03, 2019

A useful task to perform is to remove a specific element of an array. There are usually two approaches to this, you can determine the index…

How to generate code signing files for iOS

February 02, 2019

In many instances for CI machines you will need to provide Code Signing provisioning profiles as well as code signing certifications…

Change audio output channel in iOS

January 31, 2019

If you application is playing some sort of sound, perhaps music, you want to allow the user to be able to change the output source. Current…

Special literals to get current line number in Swift

January 31, 2019

One interesting feature that Swift has are the idea of special literals. The literals are unique in the way that they are able to obtain…

How to programmatically determine the current iPhone device

January 30, 2019

In many instances as an iOS developer you may want to know which device is currently running the application. In my experience, I would use…

How to add tap function to UIButton

January 29, 2019

One of the most annoyances in iOS development is to programmatically handle a tap action for a . In Android all views have an which…

Show build times in XCode

January 27, 2019

For development purposes, it's good to get an understanding of how long an app takes to build. XCode has this hidden feature that will…

How to add two Dictionaries together in Swift

January 26, 2019

In a lot of objects, it's easy to add them together, think arrays, integers, and strings. However, when you try to add two dictionaries…

Understanding the different Android Dimension units

January 25, 2019

One of the most common android questions is; . Android has four different dimension units: , , and . Let's get a better understanding…

How to Open a URL in Swift

January 24, 2019

A lot of times your iOS app may need to Deeplink into another app or open up a particular page. Fortunately, there is a function in that…

Programmatically set device volume using MPVolumeView (iOS Swift)

January 22, 2019

Often times in an application you want to be able to allow the user to change the output volume of the app. There is no easy way to achieve…

How to display an Alert Popup in iOS Swift

January 21, 2019

Often times in an iOS application you will need to prompt the user with an alert to either display something or have the user perform an…

Raw Values vs Associated Values in Swift

January 20, 2019

Raw values are used to associate constant (literal) values to enum cases. The value type is part of the enum type, and each enum case must…

WTH is Strong, Weak, Unowned in Swift?

January 19, 2019

A reference is whenever we declare a variable without specifying its reference type, it will always be strong. A reference being strong…

How to run code on the Main Thread with Delay in Swift

January 18, 2019

There are a lot of bugs that could be caused because code in not running on the main thread. Typically this could happen when you are making…

Handling Optionals with 'if let' in Swift

January 18, 2019

Typically when you have an value of let's say type , in order to get the actual value you need to use you must unwrap them. We can…

Understanding Ranges in Kotlin

January 14, 2019

Often times we need to create a loop, however in many different languages to define a range varies. In Kotlin, there are few ways we can…

How to find the Difference between two arrays in Swift

January 14, 2019

In situation where you would like all the elements that are in one array but not the other (ie in one array but not both) - a solution is to…

Convert JSON to Swift Objects

January 11, 2019

Parsing JSON in swift has always been a nightmare having to deal with Dictionaries and pulling keys from that dictionary. Swift 4+ makes it…

How to deserialize JSON using GSON (Java)

January 11, 2019

GSON helps deserializing JSON objects easily to POJO. Install Java to JSON JSON to Java Sample JSON Create Model Deserialize

Simple iOS Network Call using Moya

January 03, 2019

Install Setup Lift off!

Browse all tags