#import "ViewController.h"
@interface ViewController ()
{
//缩放因子
CGFloat currentScale;
}
@property (strong, nonatomic) UIImage *imageTrashFull;
@property (strong, nonatomic) UIImageView *imageView;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
//界面初始化
CGRect screen = [[UIScreen mainScreen] bounds];
CGFloat imageViewWidth = 128;
CGFloat imageViewHeight = 128;
CGFloat imageViewTopView = 300;
CGRect frame = CGRectMake((screen.size.width - imageViewWidth)/2 , imageViewTopView, imageViewWidth, imageViewHeight);
self.imageView = [[UIImageView alloc] initWithFrame:frame];
[self.view addSubview:self.imageView];
//创建图片对象
self.imageTrashFull = [UIImage imageNamed:@"Blend Trash Full"];
self.imageView.image = self.imageTrashFull;
//创建Pinch手势识别器
UIPinchGestureRecogn