Post

Replies

Boosts

Views

Activity

Reply to how to interpret "scale"
"line 05" is the key to the problem. The image size of faceCard will change exactly as expected, getting larger or smaller gradually according to pinching. However, without "line 05", the image size change drastically, just something like "exponential" effect. How to interpret it?
Mar ’20
Reply to how to interpret "scale"
Actually, the reason that makes me to focus on "scale" is about "gesture recognizer handler".@objc func adjustFaceCardScale(byHandlingGestureRecognizerBy recognizer: UIPinchGestureRecognizer){ switch recognizer.state { case .changed,.ended: faceCardScale *= recognizer.scale recognizer.scale = 1.0 default: break } }If I get rid of "recognizer.scale = 1.0". The image size of faceCard will change rapidly, not as expected. How it works?
Mar ’20