MapboxPanelController

public class MapboxPanelController : UIViewController
extension MapboxPanelController: UIGestureRecognizerDelegate

Controller with floating behavior. Designed for MapboxSearchController purposes.

  • Declaration

    Swift

    public enum State
  • Configuration for MapboxPanelController class. Use .default for default cases

    See more

    Declaration

    Swift

    public struct PanelConfiguration
  • Damping ration animation parameter

    Declaration

    Swift

    public var dampingRatio: CGFloat
  • Animation duration to be used on dragging end phase animation

    Declaration

    Swift

    public var animationDuration: TimeInterval
  • State of panel. To change value, use setState(_:animated:)

    Declaration

    Swift

    public private(set) var state: State { get }
  • Change panel state. Animatable

    Declaration

    Swift

    public func setState(_ toState: State, animated: Bool = true)

    Parameters

    toState

    New state

    animated

    Animate state change

  • Make new MapboxPanelController with custom PanelConfiguration

    Declaration

    Swift

    public init(rootViewController: UIViewController, configuration: PanelConfiguration = .default)

    Parameters

    rootViewController

    Root controller to be embedded into MapboxPanelController

    configuration

    PanelConfiguration for MapboxPanelController. Defaults to .default

  • Make panel from the ground without XIB support.

    Declaration

    Swift

    override public func loadView()
  • Update shadows on trait updates.

    Declaration

    Swift

    override public func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?)
  • Recalculate shadows and layout margins.

    Declaration

    Swift

    override public func viewDidLayoutSubviews()
  • Simplify presentation with automatic adding subview to the parent view.

    Declaration

    Swift

    override public func willMove(toParent parent: UIViewController?)
  • Horizontal alignment enum

    See more

    Declaration

    Swift

    public enum HorizontalAlignment
  • Horizontal alignment for MapboxPanelController. Updates are animated by default

    Defaults to .leading on iPads and .center on the others

    Declaration

    Swift

    public var horizontalAlignment: HorizontalAlignment { get set }
  • Disable vertical UIPanGestureRecognizer to fail on horizontal gestures. This is required for others horizontal gesture recognizers like UITableViewCell leading/trailing swipe actions

    Declaration

    Swift

    public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool