UIImage

The following Swift code example demonstrates how to make UIImage corners rounded. Additionally, the code snippet below also demonstrates how to: Add a border around UIImage, Change the UIImage border color. Making UIImage Corners Rounded import UIKit class ViewController: UIViewController { @IBOutlet weak var profile_picture: UIImageView! override func viewDidLoad() { super.viewDidLoad() // Make image borders rounded…

Read More Make UIImage Corners Rounded

The following Swift code snippet demonstrated how to make a UIImage circular.  It will also show how to: Make UIImage Circular programmatically and How to add a border around UIImage, Change UIImage border color. import UIKit class ViewController: UIViewController { @IBOutlet weak var profile_picture: UIImageView! override func viewDidLoad() { super.viewDidLoad() // Make image circular profile_picture.layer.cornerRadius =…

Read More Make UIImage Circular Programmatically

In this Swift code example, you will learn how to create UIImageView programmatically and how to load an image from a remote URL. Create UIImageView and UIImage programmatically, Load image data from a remote URL, Learn how to use dispatch_get_global_queue to start a background thread, Learn how to use dispatch_get_main_queue to update UI when the…

Read More UIImageView and UIImage. Load Image From Remote URL.

In this Swift tutorial, you will learn how to encode UIImage data to Base64 string. To verify that the UIImage data was correctly encoded into the Base64 string, we will decode the Base64 string back into image data and will create a new UIImage using this data. Create UIImage Before I can encode existing image…

Read More UIImage Base64 Encoding and Decoding in Swift

In this Swift tutorial, you will learn how to make UIImageView corners rounded. To learn how to programmatically create new UIImage, add it to UIImageView and make it visible in your app, have a look at the following tutorial: Create UIImage and UIImageView Programmatically Create UIImage and UIImageView To make image corners rounded, I will…

Read More UIImageView Rounded Corners in Swift

In this tutorial, you will learn how to create UIImage and UIImageView in Swift programmatically. Add Image to Xcode Project For your app to be able to display an image, the image needs to be either added to your app bundle or loaded from the Internet using an image URL. For this tutorial, I will…

Read More Create UIImage and UIImageView Programmatically