Here is how to programmatically set image to UIImageView in Xcode,
Step 01: In your Xcode project in storyboard drag UIImageView from object library (located at Xcode right utilities sidebar). Give it definite size & now note down it’s size on paper to create same size image in you choice of image editor.
Step 02: Connect UIImageView to respective header file with name e.g. imageView
Your code will look something like this: