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 Configuration
  • 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 Configuration

    Declaration

    Swift

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

    Parameters

    rootViewController

    Root controller to be embedded into MapboxPanelController

    configuration

    Configuration for MapboxPanelController. Defaults to .default

  • Make panel from the ground without XIB support.

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    public override 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