For the purity of the experiment, I created a new project, and in the StoryBoard in the ViewController I threw the Image View, I set the picture there, and also the dimensions 200x200. And hooked it up in the code. Actually, this is the controller code itself:
import UIKit class ViewController: UIViewController { @IBOutlet weak var testIMG: UIImageView! override func viewDidLoad() { super.viewDidLoad() testIMG.frame = CGRectMake(300, 150, 10, 10) } } It seems that the dimensions should change, but when you start the application, the picture remains the same size. And no matter what size I put in the code (at least 100x100, at least 10x10), all to no purpose, the picture remains 200x200.
Tell me what am I doing wrong?
-(void)viewDidLayoutSubviewshere it will work exactly - Max Mikheyenko