-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathUIMediaAlertController.h
55 lines (46 loc) · 1.82 KB
/
UIMediaAlertController.h
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
46
47
48
49
50
51
52
53
54
55
//
// UIMediaAlertController.h
// UIMediaAlertController
//
// Created by R3V0 on 25/05/2018.
// Copyright © 2018 iosdec. All rights reserved.
//
#import "UIMedia.h"
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import <MobileCoreServices/UTCoreTypes.h>
#import <ImageIO/CGImageSource.h>
#import <ImageIO/CGImageProperties.h>
#define kUIM_MediaWidth 250
#define kUIM_MediaHeight 230
#define kUIM_LineSpacing 16.5
typedef enum {
MediaTypeImage = 0,
MediaTypeVideo = 1,
}MediaType;
@interface UIMediaAlertController : NSObject <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
typedef void (^mediaPicked)(void);
typedef void (^mediaRemoved)(void);
@property (strong, nonatomic) UIViewController *controller;
@property (nonatomic, assign) MediaType type;
@property (strong, nonatomic) UIMedia *media;
@property (nonatomic, copy) mediaPicked picked;
@property (nonatomic, copy) mediaRemoved removed;
@property (nonatomic, assign) BOOL autoplayDisabled;
@property (nonatomic, assign) BOOL soundDisabled;
@property (strong, nonatomic) NSString *title;
@property (strong, nonatomic) NSString *message;
@property (strong, nonatomic) UIImageView *imageView;
@property (strong, nonatomic) UIView *videoView;
@property (strong, nonatomic) AVPlayer *playerRef;
@property (nonatomic, assign) NSUInteger delay;
// Presentation Options:
+ (void)presentWithType:(MediaType)type picked:(void(^)(void))picked;
+ (void)presentWithType:(MediaType)type picked:(void (^)(void))picked removed:(void(^)(void))removed;
+ (void)resetMedia;
+ (UIMedia *)media;
- (void)presentWithType:(MediaType)type picked:(void(^)(void))picked;
- (void)presentWithType:(MediaType)type picked:(void(^)(void))picked removed:(void(^)(void))removed;
- (void)resetMedia;
@end