2024-03-09 04:59:47 +01:00
|
|
|
// ActionSheet.ios.ts
|
|
|
|
import { ActionSheetIOS, InteractionManager } from 'react-native';
|
2024-05-20 11:54:13 +02:00
|
|
|
|
2024-03-09 04:59:47 +01:00
|
|
|
import { ActionSheetOptions, CompletionCallback } from './ActionSheet.common';
|
|
|
|
|
|
|
|
export default class ActionSheet {
|
|
|
|
static showActionSheetWithOptions(options: ActionSheetOptions, completion: CompletionCallback): void {
|
|
|
|
InteractionManager.runAfterInteractions(() => {
|
|
|
|
const iosOptions = {
|
|
|
|
...options,
|
|
|
|
};
|
2024-06-01 01:52:40 +02:00
|
|
|
if (options.anchor) {
|
|
|
|
iosOptions.anchor = options.anchor;
|
|
|
|
}
|
2024-03-09 04:59:47 +01:00
|
|
|
ActionSheetIOS.showActionSheetWithOptions(iosOptions, completion);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|