You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.0 KiB
41 lines
1.0 KiB
#import <React/RCTBridgeModule.h>
|
|
#import <UIKit/UIKit.h>
|
|
#import <React/RCTConvert.h>
|
|
|
|
typedef NS_ENUM(NSInteger, RNImagePickerTarget) {
|
|
camera = 1,
|
|
library
|
|
};
|
|
|
|
@implementation RCTConvert(PresentationStyle)
|
|
|
|
// see: https://developer.apple.com/documentation/uikit/uimodalpresentationstyle?language=objc
|
|
RCT_ENUM_CONVERTER(
|
|
UIModalPresentationStyle,
|
|
(@{
|
|
@"currentContext": @(UIModalPresentationCurrentContext),
|
|
@"fullScreen": @(UIModalPresentationFullScreen),
|
|
@"pageSheet": @(UIModalPresentationPageSheet),
|
|
@"formSheet": @(UIModalPresentationFormSheet),
|
|
@"popover": @(UIModalPresentationPopover),
|
|
@"overFullScreen": @(UIModalPresentationOverFullScreen),
|
|
@"overCurrentContext": @(UIModalPresentationOverCurrentContext)
|
|
}),
|
|
UIModalPresentationCurrentContext,
|
|
integerValue)
|
|
|
|
@end
|
|
|
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
|
|
#import "RNImagePickerSpec.h"
|
|
@interface ImagePickerManager : NSObject <RNImagePickerSpec>
|
|
@end
|
|
|
|
#else
|
|
|
|
@interface ImagePickerManager : NSObject <RCTBridgeModule>
|
|
@end
|
|
|
|
#endif
|