PhotoView.h
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// PhotoView.h
// aoyouHH
//
// Created by jinzelu on 15/4/30.
// Copyright (c) 2015年 jinzelu. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <MediaPlayer/MediaPlayer.h>
#import <AVFoundation/AVFoundation.h> // 基于AVFoundation,通过实例化的控制器来设置player属性
#import <AVKit/AVKit.h> // 1. 导入头文件 iOS 9 新增
//1.
@protocol PhotoViewDelegate <NSObject>
//点击图片时,隐藏图片浏览器
-(void)TapHiddenPhotoView;
//点击图片时,隐藏图片浏览器
-(void)longPressGesturePhotoView:(UIAlertController *)alertVC;
@end
@interface PhotoView : UIView
/**
* 添加的图片
*/
@property(nonatomic, strong) UIImageView *imageView;
//2.
/**
* 代理
*/
@property(nonatomic, assign) id<PhotoViewDelegate> delegate;
@property (nonatomic, readonly) MPMoviePlayerController *moviePlayer;
@property (nonatomic, readonly) AVPlayerViewController *avPlayer;
-(id)initWithFrame:(CGRect)frame withPhotoUrl:(NSString *)photoUrl;
-(id)initWithFrame:(CGRect)frame withPhotoImage:(UIImage *)image;
@end