我写了一个View
SimpleView.h
//
// SimpleView.h
// Demo
//
// Created by SimpleView on 2017/7/11.
// Copyright © 2017年 SimpleView. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SimpleView : UIView
@end
SimpleView.m
//
// SimpleView.m
// Demo
//
// Created by SimpleView on 2017/7/11.
// Copyright © 2017年 SimpleView. All rights reserved.
//
#import "SimpleView.h"
@implementation SimpleView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self)
{
// 拖动
[self addGestureRecognizer:[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panAction:)]];
// 缩放
[self addGestureRecognizer:[[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(pinchAction:)]];
// 旋转
[self addGestureRecog