That's how we put them together.However, when I run, image1~image6 appears as nil (there is an image called sample in the project).
I would appreciate it if you could tell me the cause.
let image1 = UIImage(named: "sample")
let image2 = UIImage(named: "sample")
let image3 = UIImage(named: "sample")
let image4 = UIImage(named: "sample")
let image5 = UIImage(named: "sample")
let image6 = UIImage(named: "sample")
let img = [image1!, image2!, image3!, image4!, image5!, image6!]
© 2024 OneMinuteCode. All rights reserved.