Complete the code to create a system image view with the name "star".
let imageView = UIImageView(image: UIImage(systemName: "[1]"))
The system image named "star" is used to create the UIImage.
Complete the code to load an image named "logo" from the app assets.
let imageView = UIImageView(image: UIImage(named: "[1]"))
UIImage(named:) loads images from the app's asset catalog. The image named "logo" is used here.
Fix the error in the code to display a system image named "heart.fill".
let imageView = UIImageView(image: UIImage(systemName: "[1]"))
The correct system image name for a filled heart is "heart.fill" with a dot, not underscore or camel case.
Fill both blanks to create an image view with a system image named "bell" and set its content mode to scale aspect fit.
let imageView = UIImageView(image: UIImage(systemName: "[1]")) imageView.contentMode = UIView.ContentMode.[2]
The system image "bell" is used. The content mode scaleAspectFit makes the image fit inside the view without distortion.
Fill all three blanks to create an image view with an asset image named "avatar", set its tint color to blue, and enable rendering mode to always template.
let image = UIImage(named: "[1]")?.withRenderingMode(UIImage.RenderingMode.[2]) let imageView = UIImageView(image: image) imageView.tintColor = UIColor.[3]
The asset image "avatar" is loaded. Setting rendering mode to alwaysTemplate allows tintColor to apply. The tint color blue is set on the image view.