SliderContainerController
@available(iOS 9.0, *)
@objcMembers
open class SliderContainerController<SliderType, CVC> : ViewController where SliderType : Slider, CVC : UIViewController
A SliderContainerController
displays a slider at the bottom of its view. It can also contain a
UIViewController
. It is supposed to be contained in a tool controller and is added above
a PhotoEditPreviewController
.
-
An object that acts as a delegate.
Declaration
Swift
open weak var delegate: SliderContainerControllerDelegate?
-
A
UIViewController
that is contained in this view controller.Declaration
Swift
public let contentViewController: CVC?
-
The container view that hosts the slider.
Declaration
Swift
open private(set) lazy var sliderContainerView: MenuAccessoryContainerView = { let sliderContainerView = IMGLY.replacingClass(for: MenuAccessoryContainerView.self).init() sliderContainerView.translatesAutoresizingMaskIntoConstraints = false return sliderContainerView }()
-
The slider in this view controller.
Declaration
Swift
open private(set) lazy var slider: SliderType = { let slider = IMGLY.replacingClass(for: SliderType.self).init() slider.translatesAutoresizingMaskIntoConstraints = false slider.minimumValue = 0 slider.maximumValue = 1 slider.neutralValue = 0 slider.addTarget(self, action: #selector(changeValue(_:)), for: .valueChanged) slider.addTarget(self, action: #selector(changedValue(_:)), for: .touchUpInside) return slider }()
-
Whether or not the slider is currently hidden.
Declaration
Swift
open private(set) var isSliderHidden: Bool { get }
-
Creates a new
SliderContainerController
with the givenUIViewController
.Declaration
Swift
public init(contentViewController: CVC?)
Parameters
contentViewController
A
UIViewController
object.
-
Hides the slider.
Declaration
Swift
open func hideSlider(animated: Bool)
Parameters
animated
Whether to animated this change.
-
Shows the slider.
Declaration
Swift
open func showSlider(animated: Bool)
Parameters
animated
Whether to animate this change.
-
Hides the slider if it is currently visible and shows it if it is currently hidden.
Declaration
Swift
open func toggleSlider(animated: Bool)
Parameters
animated
Whether to animate this change.