Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
305 views
in Technique[技术] by (71.8m points)

swift - UIImage init directly from file

I've simple question to you guys. Which init for UIImage should I use when I want to provide image directly from folder inside xcproject. enter image description here

Let me make it clear a little more. I created directory in Xcode project called "data", then I've added there some svg files.

Now I want to put it inside UIImage, to be more specific Image(uiImage: UIImage). Now I don't know how to pass path and which init should I use for the UIImage.

enter image description here

Post Scriptum: I know that the easies way to add those images is to put them into assets folder, but for me it would be more convenient.

question from:https://stackoverflow.com/questions/65872899/uiimage-init-directly-from-file

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...