252 Followers
·
Follow

Give your users the ability to set colors in your app in a whole new way

Image for post
Image for post
Photo by Robert Katzki on Unsplash

In the recent WWDC 2020, Apple introduced ColorPicker, where you’ll be able to let the user pick a color.

This will probably be very useful if your app allow users to pick a color — for either the text, background, or so on. Other than that, I still can’t think of why you’d need to implement this.

Prerequisites

To follow along with this tutorial, you’ll need some basic knowledge in:

  • A basic familiarity with Swift
  • At least Xcode 12+
  • Only supports iOS 14+

Getting Started With ColorPicker

To begin, you’ll first need to have a State created, where you can store the value of the selected color. …


At WWDC 2020, Apple introduced a view that can play local videos or videos from a URL

Arm holding out a camera.
Arm holding out a camera.
Photo by Thomas William on Unsplash.

Disclaimer: You won’t be able to use videos from YouTube.

“A view that displays the video content from a player object along with system-supplied playback controls.” — Apple Developer

Prerequisites

To follow along with this tutorial, you’ll need some basic knowledge in:

  • Swift
  • At least Xcode 12+

Note: This only supports iOS 14+.

Getting Started With VideoPlayer

To begin, you will first need to import the required module:

import AVKit

For the purpose of illustration, I will download the Nyan Cat video from YouTube, which will have an mp4 extension. …


Recommend other apps to users and let them download the app instantly

Triangular geometric shapes.
Triangular geometric shapes.
Photo by Shapelined on Unsplash.

At WWDC 2020, Apple introduced SKOverlay with which you can recommend other apps to users and allow them to download the app immediately.

Do note that you will not be able to use this on an app extension.

SKOverlay is super useful to advertise your other apps to users.

“A class that displays an overlay you can use to recommend another app.” — Apple Developer

Prerequisites

To follow along with this tutorial, you’ll need some basic knowledge in:

  • Swift
  • At least Xcode 12+

Note: This only supports iOS 14+.

Getting Started With SKOverlay

To begin, you will need to import the required framework:

import StoreKit

Then create a State to hold a bool

About

Kelvin Tan

I write about SwiftUI, UIKit, Swift, RxSwift at www.daddycoding.com.

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