PhotoView.h 1.04 KB
//
//  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