FilterEditController
@available(iOS 9.0, *)
@objcMembers
@objc(PESDKFilterEditController)
open class FilterEditController : ViewController
extension FilterEditController: PhotoEditModelSettable
extension FilterEditController: SliderEditControllerDelegate
extension FilterEditController: PhotoPreviewControlling
A FilterEditController
can update the applied filter and the filter’s intensity using a
contained SliderEditController
. It is supposed to be contained in a tool controller and is
added above a PhotoEditPreviewController
.
-
The
SliderEditController
that is contained in this view controller.Declaration
Swift
public let sliderEditController: SliderEditController<Slider>
-
An object that acts as the delegate.
Declaration
Swift
open weak var delegate: FilterEditControllerDelegate?
-
The photo edit model.
Declaration
Swift
open var photoEditModel: PhotoEditModel { get set }
-
Whether to show the filter intensity slider.
Declaration
Swift
open var showFilterIntensitySlider: Bool
-
The initial filter intensity to apply when setting a new effect.
Declaration
Swift
open var initialFilterIntensity: CGFloat
-
Creates a new
FilterEditController
with the givenSliderEditController
.Declaration
Swift
public required init(sliderEditController: SliderEditController<Slider>)
Parameters
sliderEditController
A
SliderEditController
object.
-
Updates the currently set effect. If
nil
is passed, the slider is hidden, otherwise it is shown.Declaration
Swift
open func setEffect(_ effect: Effect?, animated: Bool)
Parameters
effect
The effect to apply, if any.
animated
Whether to animate the showing or hiding of the slider.
-
This is a boxed property which exposes a Swift struct to Objective-C. This property should only be used if you are using Objective-C.
Every invocation of the getter will return a new (temporary) object wrapping the underlying Swift struct. Boxed properties cannot be chained with the dot syntax for mutable access of nested properties in place. Use the setter with the assignment operator instead to modify boxed properties, e.g.:
PESDKPhotoEditModel *photoEditModel = [[PESDKPhotoEditModel alloc] init]; // CORRECT: // get boxed `AdjustmentModel` PESDKAdjustmentModel *adjustmentModel = photoEditModel.adjustmentModel; // modify boxed `AdjustmentModel` adjustmentModel.brightness = 0.5; // set modified boxed `AdjustmentModel` photoEditModel.adjustmentModel = adjustmentModel; // WRONG: photoEditModel.adjustmentModel.brightness = 0.5;
Declaration
Swift
var boxedPhotoEditModel: _ObjCPhotoEditModel { get set }