I’m trying to create a dropdown list with textfield and I’m currently trying to put a ‘down’ arrow on the right, here is the code.
let imgView = UIImageView(frame: CGRect(x: 0, y: 0, width: 20, height: 20)) let img = UIImage(named: "down") imgView.image = downImg selectBox.rightViewMode = .always selectBox.rightView = imgView
although the image is displayed to screen, the size of the image does not fit with the UIView. Currently it looks like this.
I’ve tried changing the width and height of CGRect for a number of times but the size just refuses to change. Anyone has any idea about this problem?