Blog

In this tutorial, you will learn how to internationalize your app. This is necessary if you are planning to make your app available across multiple countries. Contrary to frameworks like native Android, Flutter doesn’t have an absolutely set way of how localization is done. It gives you a lot of freedom which can be good…

Read More Internationalization Example In Flutter

In this blog post, you will learn how to create a UIBarButtonItem with Image in Swift. It is going to be a very short and simple Swift code example, that demonstrates how to: Create UIBarButtonItem programmatically, Create UIImage programmatically, Add image to UIBarButtonItem, Add target action to UIBarButtonItem to call a local function. import UIKit class…

Read More UIBarButtonItem with Image Example in Swift

In Swift, you can load HTML files into your WKWebView from a file that is part of your App Bundle. Before you use the below code snippet, please make sure that the HTML file you want to display in WKWebView is added to your project. Load Local HTML File to a WKWebView let myUrl = myProjectBundle.url(forResource: “my-html-file”,…

Read More WKWebView. Load HTML File from App Bundle.

In this short Swift code example, you will learn how to create and customize UITextView programmatically in Swift. The code example below will cover the following: Create UITextView programmatically, Position UITextView at a specific location within a view, Position UITextView at the center of the view, Change UITextView text color, Change UITextView background color, Set…

Read More Create and Customize UITextView Programmatically in Swift

In this short Swift code example, you will learn how to create UITextView programmatically in Swift. Create UITextView programmatically Position UITextView at a specific location within a view Position UITextView at the center of the view Change UITextView text color Change UITextView background color let textView = UITextView(frame: CGRect(x: 20.0, y: 90.0, width: 250.0, height:…

Read More Create UITextView Programmatically in Swift

In this short Swift code example, you will learn how to create and customize UITextView programmatically in Swift. Create UITextView programmatically Position UITextView at the center of the view Change UITextView background colour Create UITapGestureRecognizer Add UITapGestureRecognizer to main view Add UITextView as a subview Create a function to handle Tap away event import UIKit…

Read More Dismiss UITextView Keyboard When User Taps Away

In this short Swift code example, you will learn how to check if file exists at specified path. Find a Documents directory on device Check if file exists at specified file path let fileNameToDelete = “myFileName.txt” var filePath = “” // Fine documents directory on device let dirs : [String] = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.allDomainsMask, true) if…

Read More Check if a File Exist

In this short Swift code example, you will learn how to perform a time consuming task in background thread in Swift, to keep mobile app responsive to user actions while the task is being executed and how to update UI from an async task once background task has completed. Do some task in background thread…

Read More Time Consuming Task in Background Thread in Swift

In this Swift code example, you will learn how to: Create UIBarButtonItem programmatically, How to set right side bar button item(rightBarButtonItem), How to set left side bar button item(leftBarButtonItem), How to set target action on UIBarButtonItem to call a custom function when the button is tapped. Below is a very simple code example in Swift…

Read More Create UIBarButtonItem Programmatically

In this short Swift code example, you will learn how to create UITextField in Swift programmatically. The code example below will cover the following: Create UITextField of specific height and width, Position UITextField at the center of the view, Set UITextField backgroundColor, Set UITextField textColor, Set UITextField UITextBorderStyle, Add UITextField as a subview, Set UITextField…

Read More Create UITextField Programmatically

Free Video Lessons

Enter your email and stay on top of things,

Subscribe!