Swift

Inline UIDatePicker allows you to integrate a date picker directly into your table view cells. In this tutorial, you will learn how to create a simple application that displays a UIDatePicker within a table view cell. Step 1: Setup TableView To begin, you’ll need to set up a UITableView in your view controller. This involves creating an…

Read More Inline UIDatePicker or DateCell Example in Swift

In this tutorial, you will learn how to disable the rotation of UIViewController embedded into UINavigationController in Swift. By the end of this tutorial, you will have a working Swift code example that you can use in your mobile application. Step 1: Override shouldAutorotate Function in UIViewController To begin, you need to override the shouldAutorotate function in your UIViewController subclass.…

Read More Disable Rotation of UIViewController Embedded into UINavigationController

In this tutorial, you’ll learn how to determine the main screen’s height and width in both UIKit and SwiftUI. You need to know this if you want your mobile apps to adapt to different screen sizes and orientations. If you are interested in learning how to determine device orientation and how to handle device rotation,…

Read More Determine Main Screen Height and Width in Swift

In this tutorial, you will learn how to add a playback slider to AVPlayer in Swift to control audio playback. By the end of this tutorial, you will have a working Swift code example that you can use in your mobile application. Step 1: Create AVPlayer and AVPlayerItem First, you need to import the necessary…

Read More Adding Playback Slider to AVPlayer In Swift

In this tutorial, you will learn how to play the music mp3 file from a remote URL in Swift. To play music in your mobile app, you will use two very important classes: AVPlayer and AVPlayerItem. But before I show you how to use them, I will briefly describe each one to you. AVPlayer is…

Read More AVPlayer. Play Music MP3 File From a Remote URL In Swift

In this tutorial, you will learn how to drop a MKPointAnnotation pin on a MapView at user’s current location programmatically in Swift. By the end of this tutorial, you will have a working Swift code example that you can use in your mobile application. Step 1: Import MapKit and CoreLocation Firstly, you need to import…

Read More Drop a MKPointAnnotation Pin on a MapView at User’s Current Location

WKWebView is a powerful class in the WebKit framework that allows you to embed web content in your iOS app. It’s essentially a mini-browser that provides a rich, interactive web experience within your application. Unlike UIWebView, which was deprecated and removed from iOS 12 onwards, WKWebView is more efficient, has better performance, and offers advanced features like…

Read More Create WKWebView Programmatically and Load Webpage URL

Local notifications are a powerful feature that allows you to engage with your users by sending timely reminders, updates, and alerts directly to their devices. In this tutorial, you’ll learn how to implement local notifications in SwiftUI, focusing on two types of triggers: time interval and calendar. I’ll start by explaining how to request notification…

Read More Create, Schedule and Receive Local Notifications in Swift

In this tutorial, you will learn how to determine a user’s current location in Swift using CLLocationManager and CLLocationManagerDelegate. CLLocationManager is the class that you use to start and stop the delivery of location-related events to your app. You can use it to track the user’s current location, report heading changes, monitor regions of interest, and range nearby…

Read More Determine User’s Current Location in Swift

In this tutorial, you will learn how to create UIImageView programmatically and how to load an image from a remote URL.  I’ll show you how to create a UIImageView and UIImage programmatically, and teach you how to fetch and display an image from a URL. Step 1: Creating UIImageView Programmatically First,  let’s create a UIImageView programmatically. UIImageView is a…

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