skip to Main Content

I have tried the #imageliteral method but it seems to not working also. I need to use many images in an array so is there any alternative to it or not?

3

Answers


  1. Use

    #imageLiteral(

    without the closing parenthesis, In this way you can add images in Xcode 13.

    Login or Signup to reply.
  2. use #imageLiteral like you did befor but then add the parentheses and you will get a blank image. Then click the image and you probably know what to do after that

    Login or Signup to reply.
  3. Dear @Amish to solve this problem you can use the following instruction:

    Syntax:

    who.what=value
    
    Image1.image=UIImage(named:"Image2")
    

    write your image name in parentheses

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search