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")
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)
Top comments (0)