DEV Community

AJITHKUMAR K
AJITHKUMAR K

Posted on

ImageView

ImageView can be defined as an object that can display the images on the interface of the iOS applications. It is the instance of the UIImageView class, which inherits UIView.

Create UIImage

  UIImage(named:"a-lion.jpeg")!, Name:"Lion")
Enter fullscreen mode Exit fullscreen mode

create UIImageView

DisplayView=UIImageView(image: modelList[indexPath.row].image)
        DisplayView.frame=CGRect(x: 100, y: 300, width: 200, height: 200)
        DisplayView.backgroundColor = .red
        DisplayView.clipsToBounds=true
        DisplayView.layer.borderWidth = 5
        DisplayView.layer.cornerRadius = 100
        view.addSubview(DisplayView)
Enter fullscreen mode Exit fullscreen mode

Image description

Top comments (0)