April 2020
Beginner
316 pages
8h 20m
English
Let's start by heading on over and taking a look at our implementation of ImageHelper.swift. Much like UIViewRepresentable, the layout and required functions are pretty much the same. So, for this reason, we won't go through and create another UIViewControllerRepresentable struct; instead, we'll just cover how we created ImagePickerViewController function by function.
First of all, let's take a look at our makeUIViewController() function. Much like the makeUIView() function, here, we create an instance of UIViewController we want to use and return this to SwiftUI so that it can use it:
func makeUIViewController(context: UIViewControllerRepresentableContext<ImagePickerViewController>) -> UIImagePickerController ...
Read now
Unlock full access