新建工程,编辑控制器的.h文件如下:
//
// ViewController.h
// 多媒体B
//
// Created by apple on 15/9/4.
// Copyright (c) 2015年 LiuXun. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (nonatomic, strong) UIImageView *imageView;
@end
编辑控制器的.m文件如下:
//
// ViewController.m
// 多媒体B
//
// Created by apple on 15/9/4.
// Copyright (c) 2015年 LiuXun. All rights reserved.
//
#import "ViewController.h"
#define WIDTH [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height
/*
注意:当为ImageView显示图片或其他的组件添加监听的话,就让这个组件添加对应的手势子控件。
切记:手势效果和监听只对添加对应手势对象的控件起作用
*/
@interface ViewController ()
@end
@impl