RFSCameraToolbarView

Objective-C

@interface RFSCameraToolbarView : UIView <RFSOverriding>

@property(readwrite, nonatomic, assign) RFSCameraToolbarViewState state;

#pragma mark - Overriding

/// Defaults to not `nil`. Can be overriden directly or set to `nil` to hide a button from the toolbar.
@property(readonly, nonatomic, nullable) UIButton *torchButton;

/// Defaults to not `nil`. Can be overriden directly or set to `nil` to hide a button from the toolbar.
@property(readonly, nonatomic, nullable) UIButton *switchCameraButton;

/// Defaults to not `nil`. Can be overriden directly or set to `nil` to hide a button from the toolbar.
@property(readonly, nonatomic, nullable) UIButton *closeButton;

/// Setups default constraints. Can be overriden to provide custom layout constraints.
- (void)setupConstraints;

/// Updates CameraToolbarView state. Called when `state` propperty is changed.
/// Can be overriden to provide custom appearance for different states of ToolbarView.
- (void)updateState:(RFSCameraToolbarViewState)state;

#pragma mark - Styling

- (void)setTintColor:(nullable UIColor *)color forState:(RFSCameraToolbarViewState)state UI_APPEARANCE_SELECTOR;
- (nullable UIColor *)tintColorForState:(RFSCameraToolbarViewState)state UI_APPEARANCE_SELECTOR;

@end

Swift

class CameraToolbarView : UIView, Overriding

Undocumented

  • Undocumented

    Declaration

    Objective-C

    @property(readwrite, nonatomic, assign) RFSCameraToolbarViewState state

    Swift

    var state: CameraToolbarViewState { get set }

Overriding

  • Defaults to not nil. Can be overriden directly or set to nil to hide a button from the toolbar.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIButton *torchButton;

    Swift

    var torchButton: UIButton? { get }
  • Defaults to not nil. Can be overriden directly or set to nil to hide a button from the toolbar.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIButton *switchCameraButton;

    Swift

    var switchCameraButton: UIButton? { get }
  • Defaults to not nil. Can be overriden directly or set to nil to hide a button from the toolbar.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIButton *closeButton;

    Swift

    var closeButton: UIButton? { get }
  • Setups default constraints. Can be overriden to provide custom layout constraints.

    Declaration

    Objective-C

    - (void)setupConstraints;

    Swift

    func setupConstraints()
  • Updates CameraToolbarView state. Called when state propperty is changed. Can be overriden to provide custom appearance for different states of ToolbarView.

    Declaration

    Objective-C

    - (void)updateState:(RFSCameraToolbarViewState)state;

    Swift

    func updateState(_ state: CameraToolbarViewState)

Styling

  • Undocumented

    Declaration

    Objective-C

    - (void)setTintColor:(nullable UIColor *)color forState:(RFSCameraToolbarViewState)state UI_APPEARANCE_SELECTOR;

    Swift

    func setTintColor(_ color: UIColor?, for state: CameraToolbarViewState)
  • Undocumented

    Declaration

    Objective-C

    - (nullable UIColor *)tintColorForState:(RFSCameraToolbarViewState)state UI_APPEARANCE_SELECTOR;

    Swift

    func tintColor(for state: CameraToolbarViewState) -> UIColor?