How to animate a UIImageview to display fullscreen by tapping on it?

后端 未结 5 1851
眼角桃花
眼角桃花 2020-12-07 22:16

I have an UIImageView in a UITableviewCell. When it is tapped, the UIImageView should animated to be displayed fullscreen. When the image is tapped when it is fullscreen it

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-07 22:27

    Just finished a version in swift, just download and add into your project:

    GSSimpleImageView.swift

    And usage:

    let imageView = GSSimpleImageView(frame: CGRectMake(20, 100, 200, 200))
    imageView.image = UIImage(named: "test2.png")
    self.view.addSubview(imageView)
    

提交回复
热议问题