mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 21:26:57 +02:00
Media Picker: Apply Ribot design
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
#import <MatrixKit/MatrixKit.h>
|
||||
|
||||
#import "MediaAlbumContentViewController.h"
|
||||
|
||||
@class MediaPickerViewController;
|
||||
|
||||
/**
|
||||
@@ -25,37 +27,28 @@
|
||||
|
||||
/**
|
||||
Tells the delegate that the user select an image.
|
||||
Note: Captured image are automatically saved in user's library.
|
||||
|
||||
@param mediaPickerController the `MediaPickerViewController` instance.
|
||||
@param image the UIImage hosting the image data to send.
|
||||
@param imageURL the url that references the image in the file system or in the AssetsLibrary framework (nil if the image is not stored in Photos library).
|
||||
@param imageURL the url that references the image in the file system or in the AssetsLibrary framework.
|
||||
*/
|
||||
- (void)mediaPickerController:(MediaPickerViewController *)mediaPickerController didSelectImage:(UIImage*)image withURL:(NSURL*)imageURL;
|
||||
|
||||
/**
|
||||
Tells the delegate that the user select a video.
|
||||
Note: Captured video are automatically saved in user's library.
|
||||
|
||||
@param mediaPickerController the `MediaPickerViewController` instance.
|
||||
@param videoURL the local url of the video to send.
|
||||
@param isCameraRecording tells whether the provided video has just been recorded.
|
||||
*/
|
||||
- (void)mediaPickerController:(MediaPickerViewController *)mediaPickerController didSelectVideo:(NSURL*)videoURL isCameraRecording:(BOOL)isCameraRecording;
|
||||
|
||||
@optional
|
||||
/**
|
||||
Tells the delegate that the user select a set of assets.
|
||||
This callback is used only when multiple selections is allowed (see 'multipleSelections' property)
|
||||
|
||||
@param mediaPickerController the `MediaPickerViewController` instance.
|
||||
@param assets the array of selected assets (PHAsset instances).
|
||||
*/
|
||||
- (void)mediaPickerController:(MediaPickerViewController *)mediaPickerController didSelectAssets:(NSArray*)assets;
|
||||
- (void)mediaPickerController:(MediaPickerViewController *)mediaPickerController didSelectVideo:(NSURL*)videoURL;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
*/
|
||||
@interface MediaPickerViewController : MXKViewController <UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout, AVCaptureFileOutputRecordingDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate>
|
||||
@interface MediaPickerViewController : MXKViewController <UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout, AVCaptureFileOutputRecordingDelegate, MediaAlbumContentViewControllerDelegate>
|
||||
|
||||
/**
|
||||
* Returns the `UINib` object initialized for a `MediaPickerViewController`.
|
||||
@@ -77,25 +70,23 @@
|
||||
@property (weak, nonatomic) IBOutlet UIScrollView *mainScrollView;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *captureViewContainer;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *captureViewContainerHeightConstraint;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *captureLabel;
|
||||
//@property (weak, nonatomic) IBOutlet NSLayoutConstraint *captureViewContainerHeightConstraint;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *cameraPreviewContainerView;
|
||||
@property (weak, nonatomic) IBOutlet UIView *cameraCaptureContainerView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *cameraCaptureImageView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *cameraPreviewContainerAspectRatio;
|
||||
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *cameraActivityIndicator;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *cameraModeButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *closeButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *cameraSwitchButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *cameraCaptureButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *cameraRetakeButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *cameraChooseButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *cameraModeButton; // TODO ?
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *recentCapturesCollectionContainerView;
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *recentCapturesCollectionView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *recentCapturesCollectionContainerViewHeightConstraint;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *libraryViewContainer;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *libraryLabel;
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *recentPicturesCollectionView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *recentPictureCollectionViewHeightConstraint;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *libraryOpenButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *libraryChooseButton;
|
||||
@property (weak, nonatomic) IBOutlet UITableView *userAlbumsTableView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *libraryViewContainerViewHeightConstraint;
|
||||
|
||||
/**
|
||||
The delegate for the view controller.
|
||||
@@ -107,15 +98,5 @@
|
||||
*/
|
||||
@property (nonatomic) NSArray *mediaTypes;
|
||||
|
||||
/**
|
||||
Tell whether multiple media can be selected at once in recents collection (default is NO).
|
||||
*/
|
||||
@property (nonatomic, getter=isMultipleSelections) BOOL multipleSelections;
|
||||
|
||||
/**
|
||||
The label of the selection button (default value is "Choose").
|
||||
*/
|
||||
@property (nonatomic) NSString *selectionButtonCustomLabel;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user