I can't seem to connect my action (pinch gesture) to my view, instead it connects to the viewcontroller. This is everything i have coded in the view controller to test out the code:
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()
}
}
All i want to do is zoom into the form i fill out in my app (text boxes - buttons and labels, checkboxes - buttons and labels, background image - image view). I want to be able to zoom into everything at once. Im failing miserably. Please help! :)