self.image.frame.width = 20 give get only property error
问题 i tried to change the width of my Image view to 20 @IBOutlet weak var image: UIImageView! using this code in viewDidLoad self.image.frame.width = 20 but it give me error cannot assign to property: width is a get only property. what does that mean?? sorry i am new to swift i do not know what it mean.please help 回答1: get-only means you can only read this property (for example to compare with something), but not change. To set width you need this: self.image.frame.size.width = foo 回答2: There is