Sign in

•20 • WWDC ’19, ’20 Scholar •GSoC 2020 with VLC •iOS Engineer • @neontheapp •Airplane and Space Enthusiast

Leverage the UIViewControllerRepresentable in your SwiftUI application

Custom fonts in a SwiftUI application
Custom fonts in a SwiftUI application
Custom fonts in a SwiftUI application. Photo by the author.

Over the past year, SwiftUI has gotten more robust and mature than it was just a couple of years ago. However, there are still quite a few UIKit elements missing in SwiftUI — and one of them is the . This UIKit class is a subclass of and is used to allow the users to pick a font that is preinstalled on their device. This allows a whole new dimension of customizability and is something that I am working on with the new update of Sticker Cards.

In this tutorial, we’ll build a simple bridge that brings this powerful…


Swift 5.1 introduces a new property concept called property wrapper. A property wrapper helps you mark a clear distinction between the code that defines a property and the code that manages how that property is stored. For example, a common task that we as iOS developers face regularly is persisting data in the UserDefaults store. In this tutorial, we’ll learn how to handle reading and writing data from and to UserDeafaults. This can be streamlined and the distinction mentioned above can be created by using a property wrapper.

Getting started

Let us get started by creating a struct and by defining a…


This article was originally published on my website

According to the Swift Org Docs:
Generic code enables you to write flexible, reusable functions and types that can work with any type, subject to requirements that you define. You can write code that avoids duplication and expresses its intent in a clear, abstracted manner.

Introduction

In this article, we’ll learn about generics by writing and optimizing a maximumOfTwo function. This function will be used to first get the maximum between two integers but later in this article, you’ll learn how to convert this function into a generic so that this function will…


In this tutorial, we’ll learn how to use the IGStoryKit framework to share stickers with customized background to Instagram Stories.

Overview

lets you easily share content stickers with different background types to Instagram stories from your iOS and iPadOS apps.

Installation

is available via Swift Package Manager. To add simply add this repo’s URL to your project’s package file.

Prerequisites

To follow along with this tutorial, you’ll need some basic knowledge of the Swift Programming Language. You’ll also need Xcode versions supporting iOS 11 and above.

Getting started

Before we start configuring and posting to Instagram stories, we’ll need to create…


This article was originally published on my website.

In this tutorial, we’ll learn how to deal with Optionals in Swift.

What are optionals?

Optionals are Swift Language traits that lets the programmer operate on a variable that may or may not have a value at a particular instance. Usually, this applies to async tasks such as Networking: When you make a request to a server for, say, a list of cat pictures the data in the variable will take some time to arrive. During this loading time if you’d try to access the value within this variable you will crash the application since…


At WWDC 2020 SwiftUI got a new property wrapper called . What is the main purpose and why does this new property wrapper exist?

Previously when views subscribed to Data models, they did so with the property wrapper. This was fine, however there was a critical issue. is not owned by the view. It is not considered to be the view’s ultimate source of truth. The variable attached to the said property wrapper is not in control/dependent on the view’s lifecycle. This caused an error especially when a view would instantiate its body property before the property…


This tutorial was first published on my blog.

At WWDC 2020, Apple announced various improvements to their frameworks and SwiftUI was at the front of the line to receive new API and existing API refinements. In this tutorial, we’ll learn how crazy simple it is to integrate MapViews using the MapKit framework, which is now native, in your SwiftUI Applications. Let’s go

Please note that this tutorial requires you to have Xcode 12 but doesn’t require that you have macOS Big Sur installed in your machine.

The first thing we have to do is to in your current…


This article was originally published on my blog.

At WWDC 2020 Apple announced a whole new set of interactions with the existing UIMenu and UIAction APIs. The small menus that were previously triggered by haptic/3D Touch can now be shown without them. Here’s how

This tutorial requires that you have Xcode 12 installed

Let’s make a simple UIKit app. I’ll be using storyboards in this tutorial as it’s simpler for what we’re going to do here. Make sure to embed your ViewController in a NavigationController so that we can access the navigationItems property on the Navigation Bar. …


This post was originally published on my blog

A Brand new ColorPicker introduced at WWDC 2020

WWDC 2020 brought many new UIControl APIs to iOS, iPadOS, and macOS. One of the best new additions is the system Color Picker. Here are some of the main features of this new control-

  • Native- adapts to system fonts, themes.
  • Powerful- Colors can be picked from 3 different modes and it provides a screen picker which can be used to pick colors from anywhere on the screen
  • Transferable Pallets- Picked colors from the color picker can be accessed from anywhere.
  • Universal- Available on iOS, iPadOS and with Catalyst on macOS

Let’s code

The first…


A really overexposed picture of McEnery Convention Center with the Dub Dub Neon Banner

At WWDC 2019 Apple announced that it’ll now be possible to port iOS apps to the Mac via a technology called Catalyst and ever since I’ve had a goal to bring an existing app of mine to the Mac App Store just to see what the process would look like.

I’ve been working on making my Color and Gradient maker, analyzer and editor app called Neon work on the Mac and even though I use storyboards, I don’t use segues and so it is important that I know when the View Controller needs to be presented by pushing it onto…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store