Create a UIImageView iOS
1 min readOct 5, 2020
To create a UIImageView programmatically, all you need to do is create an instance of UIImageView:
//Swiftlet imageView = UIImageView()//Objective-CUIImageView *imageView = [[UIImageView alloc] init];
You can set the size and position of the UIImageView with a CGRect:
//SwiftimageView.frame = CGRect(x: 0, y: 0, width: 200, height: 200)//Objective-CimageView.frame = CGRectMake(0,0,200,200);
Or you can set the size during initialization:
//SwiftUIImageView(frame: CGRect(x: 0, y: 0…