Display local image in UIImageView

后端 未结 4 1735
[愿得一人]
[愿得一人] 2021-01-01 12:09

How do I display an image in the UIImageView component from the hard drive?

I have a local folder called \"images\" and would like to access it via a relative path,

4条回答
  •  一向
    一向 (楼主)
    2021-01-01 13:14

    You dont need to give any path as long as the image is in your resources folder.

    You can display that image in the imageView using this.

    yourImageView.image = [UIImage imageNamed:@"something.png"];
    

提交回复
热议问题