let imageView = PinchableImageView()
imageView.image = UIImage(named: "lena")!
imageView.sizeToFit()
imageView.center = view.center
view.addSubview(imageView)
imageView.addCornerViews([.LeftTop: cornerView])
imageView.addCornerViews([.LeftTop: cornerView], panEnabled: false)
protocol PinchableImageViewDelegate {
optional func pinchableImageViewTouchesBegan(pinchableImageView: PinchableImageView, touches: Set<UITouch>, withEvent event: UIEvent?)
optional func pinchableImageViewTouchesMoved(pinchableImageView: PinchableImageView, touches: Set<UITouch>, withEvent event: UIEvent?)
optional func pinchableImageViewTouchesEnded(pinchableImageView: PinchableImageView, touches: Set<UITouch>, withEvent event: UIEvent?)
}
PinchableImageView is available through Carthage. To install it, simply add the following line to your Cartfile:
github "malt03/PinchableImageView"
PinchableImageView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "PinchableImageView"
Koji Murata, malt.koji@gmail.com
PinchableImageView is available under the MIT license. See the LICENSE file for more info.