This code doesn't seem to work. wondering what I'm doing wrong/missing. I assume that I: drag and drop the UIPinchGestureRecognizer to the viewcontroller (so that it doesn't interfere with the connections to buttons, label etc. and it is connected to the viewcontroller); then implement this code (make sure connections are proper):
import UIKit
class AlertController: UIAlertController {
@IBAction func scaleImage(sender: UIPinchGestureRecognizer) {
self.view.transform = CGAffineTransformScale(self.view.transform, sender.scale, sender.scale)
sender.scale = 1
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
view.backgroundColor = UIColor.blackColor()
}
override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning()
}
}
Please help !