Resizing a UIImage View on Swift 4

258 Views Asked by At

enter image description hereSo I've literally looked everywhere but can't see an easy example of how to resize a UIImageView! my current code is using an IBAction and a UIView.animate to move the image UP and into the corner, all I am trying to add to it, is to make it resize smaller to fit! ANY pointers would be amazing as I am new to swift :)

@IBAction func ContinueTapped(_ sender: Any) {

    print("pressed!")
    UIView.animate(withDuration: 1, animations:{
        self.aapTitle.frame.origin.y -= 150; self.aapTitle.frame.origin.x -= 50;})
1

There are 1 best solutions below

0
Taylor Styles On

the best way of doing it which was given to me via SAXENA was: self.aapTitle.frame = CGRect(x:15, y: 25, width: 35, height: 35)