Native Interfaces
PhotoEditor SDK for React Native has some dedicated native interfaces build-in to provide better access and customization possibilities. These interfaces are accessible via the FlutterPESDK
class and are available for iOS only.
Usage#
Before using any of the native interfaces described below, you need to import the native module:
import ImglyKit
configureWithBuilder
#
configureWithBuilder
#The FlutterPESDK.configureWithBuilder
function allows you to modify the native Configuration
before it gets passed to the editor. You can make all kinds of adjustments here that are not possible from the React Native configuration, e.g., change buttons or use closures of individual tools. For further information, please have a look at the dedicated native guides.
FlutterPESDK.configureWithBuilder = { builder in// Disable the color pipette for the text color selection toolbuilder.configureTextColorToolController { options invar colors = options.availableColors// Remove first color item which is the color pipettecolors.remove(at: 0)options.availableColors = colors}}
willPresentPhotoEditViewController
#
willPresentPhotoEditViewController
#The FlutterPESDK.willPresentPhotoEditViewController
function is called right before the photo editor is presented and allows you to make adjustments directly to the editor.
FlutterPESDK.willPresentPhotoEditViewController = { photoEditViewController inprint("Will present:", photoEditViewController)}