UIImageView pinch zoom swift

前端 未结 13 733
误落风尘
误落风尘 2020-11-28 04:06

I was hoping someone could help me out. I am trying to allow a user to pinch zoom on a UIImageView(with a max and min level allowed). But for some reason the it does not wor

13条回答
  •  情深已故
    2020-11-28 04:38

    I ended up here, probably searching the wrong way.

    I was after having my imageView in contentMode = .centre. But I was judging it too zoomed in and I was searching a way to zoom it out. Here's how:

        self.imageView.contentScaleFactor = 3
    

    1 is as if you were doing anything. More that 1 zooms out... 3 works for me but you need to test it out.

提交回复
热议问题