2016-11-01 8 views
0
var width: CGFloat = 0 
var height: CGFloat = 0 
@IBOutlet weak var imageView1: UIImageView! 

@IBAction func zoomto(_ sender: UIPinchGestureRecognizer) { 

imageView1.frame = CGRect(imageView1.frame.origin.x, imageView1.frame.origin.y, width * sender.scale, height * sender.scale) 
    } 

을 알아낼 수 없습니다 가능한 일치하지 않습니다 .은 3 신속한에서 핀치 제스처 인식기에 근무하고 오류 "인수 라벨 '(_ : _ : _ : _ :)'보여주는 다음과 같은 오류

변경할 필요가 어떤 생각 나는 유효한 CGRect 생성자를 사용하는 생각이

답변

0

를 해결하기 위해 오버로드 - the docs here를 참조

를 귀하의 경우가 될 것 같은 뭔가 :

CGRect(x: imageView1.frame.origin.x, y: imageView1.frame.origin.y, width: width * sender.scale, height: height * sender.scale) 
+0

도움 주셔서 감사합니다. – anex

+0

안녕하세요. –