imgly-sdk-ios 无法禁用内部菜单项操作

问题描述

我将 imglysdk 用于视频编辑器。它有许多功能,如修剪、文本等。我​​成功地将 sdk 集成到我的应用程序中。 我想为我的应用程序的免费用户禁用一些功能,并为付费用户提供完全访问权限。所以我想禁用它的一些功能,同时单击该按钮用户会弹出“这仅适用于付费用户”。请帮帮我。

转换是第一个动作 https://i.stack.imgur.com/KEXzV.png 单击此按钮后,您将获得更多操作

enter image description here

现在我想禁用 16:9 并在点击后显示免费用户无法访问此功能的警报。

此处给出了 sdk

我做了一些代码,但无法完成。我只能使用此代码隐藏转换操作

     /// Options for configuring a `TransformToolController`.
  @objcmembers @objc(PESDKTransformToolControllerOptions) open class TransformToolControllerOptions : ImglyKit.ToolControllerOptions {

      /// Whether to show a reset button to reset the applied crop,rotation and straighten angle.
/// Defaults to `true`.
@objc final public let showResetButton: Bool

/// Whether to allow free cropping. If this is enabled,'Free' is always the first available option.
/// If disabled,the asset will be cropped automatically using the best fitting aspect from `allowedCropAspects`
/// or in case that `MediaEditViewControllerOptions.forceCropMode` is set to `true` the user will
/// be forced to pick one of the `allowedCropAspects` at launch.
/// Defaults to `true`.
@objc final public let allowFreeCrop: Bool

/// Defines all allowed crop aspects. The crop aspect buttons are shown in the given order.
/// If the size of the asset is not fitting one of these aspects and `allowFreeCrop` is disabled,it is
/// automatically cropped using the best fitting aspect from this array.
/// Defaults to `1:1`,`16:9`,`4:3` and `3:2`.
@objc final public let allowedCropAspects: [ImglyKit.CropAspect]

/// This closure allows further configuration of the crop aspect buttons. The closure is called for
/// each crop aspect button and has the button and its corresponding crop aspect as parameters.
@objc final public let cropAspectButtonConfigurationClosure: ((ImglyKit.MenuCollectionViewCell,ImglyKit.CropAspect?) -> Void)?

/// This closure is called every time the user selects a crop aspect.
@objc final public let cropAspectSelectedClosure: ((ImglyKit.CropAspect?) -> Void)?

/// This closure allows further configuration of the transform buttons,i.e. rotate left and flip. The closure is called for
/// each button and has the button and its corresponding transform action as parameters.
/// The scalepicker to choose the straighten angle,has its own configuration closeure.
@objc final public let transformButtonConfigurationClosure: ((ImglyKit.Button,ImglyKit.TransformAction) -> Void)?

/// This closure alloes further configuration of the scale picker. This UI element is used to
/// choose the straighten angle.
@objc final public let scalePickerConfigurationClosure: ((ImglyKit.ScalePicker) -> Void)?

/// This closure alloes further configuration of the scale picker container view.
@objc final public let scalePickerContainerViewConfigurationClosure: ((UIView) -> Void)?

/// :nodoc:
@objc dynamic public convenience init()

/// Creates a new instance of `TransformToolControllerOptions` using the given builder.
///
/// - Parameter builder: A `TransformToolControllerOptionsBuilder` object.
@objc public init(builder: ImglyKit.TransformToolControllerOptionsBuilder)

/// Creates a newly allocated instance of `ToolControllerOptions` using the given biulder.
///
/// - Parameter editorBuilder: A `ToolControllerOptionsBuilder` instance.
@objc override public init(editorBuilder: ImglyKit.ToolControllerOptionsBuilder)
 }

我有这个类似乎可以选择禁用。我如何将allowFreeCrop 之类的选项更改为false,它的let 变量显示无法更改。 请帮帮我。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)