John Song
John Song

Reputation: 3

Adding images into swift playgrounds [iPad]

How do I add images into Swift playground through my camera roll. In the “learn to code 3”, it allowed you to add any photo from your camera roll. I looked into a article on stack overflow, but it seems to be for the computer version. How do I add images on Swift playgrounds for iPad? I know that you will need to use UIKIT

Upvotes: 0

Views: 956

Answers (2)

AlexH
AlexH

Reputation: 856

I'm sorry, but it will break if you try to put it into a live view. Sorry. This only works on Apple's playgrounds or on playgrounds without a live view.

Upvotes: 0

Robert Dresler
Robert Dresler

Reputation: 11140

First write this

let image: Image = 

then you will see this icon over the keyboard

enter image description here

tap on it and then you will be able to see this view where you can select image.

enter image description here

Upvotes: 1

Related Questions