TweakSecondaryView

public protocol TweakSecondaryView : UIViewController, TweakView

A view to show/change the value of a tweak.

A tweak can opt-in a secondary view when its primary view has not enough room to display the UI for users to change the value. For example, UIColor uses a secondary view which uses some sliders for adjustment.

TweKit shows a secondary view in a bottom panel sheet.

  • estimatedHeight Default implementation

    The estimated height of the view.

    TweaKit uses this height to calculate the height of the bottom panel sheet for the view.

    If this method is not implemented, then the return value is assumed to be a default height.

    Default Implementation

    Declaration

    Swift

    var estimatedHeight: CGFloat { get }
  • Reload the view with a tweak.

    Declaration

    Swift

    func reload(withTweak tweak: AnyTweak, manually: Bool)

    Parameters

    tweak

    the tweak to reload with.

    manually

    A flag indicates whether the update operation is triggered manually by users.

  • horizontalPadding Extension method

    Undocumented

    Declaration

    Swift

    var horizontalPadding: CGFloat { get }