Selecting images from Library and putting it in the PKCanvas in Core Data

Can anyone provide resources for Picking multiple images from the image library (I have used PHPicker) and then appending the same number of PKcanvas with those previously selected images as a background image of the canvas in a list?

I followed this article to add new canvas by looping the multiple images array and applied it in ContentView: https://blog.devgenius.io/saving-images-in-coredata-8739690d0520

But adding a background image can be done in the UIViewController where the PKCanvasView(Just followed a common PencilKit tutorial) is defined.

Any kind of help would be appreciated. Thanks.

Selecting images from Library and putting it in the PKCanvas in Core Data
 
 
Q