TTControlView

Objective-C

@interface TTControlView

Swift

class TTControlView

TTControlView representes transparent UIView which added on top of TTMapView can display compass and center button. Given buttons are displyed on fixed positions which can be adjust using exposed constraints.

  • Initialize default compass button and adds it to UI.

    Declaration

    Objective-C

    - (void)initDefaultCompassButton;

    Swift

    func initDefaultCompassButton()
  • Initialize default center button and adds it to UI.

    Declaration

    Objective-C

    - (void)initDefaultCenterButton;

    Swift

    func initDefaultCenterButton()
  • Reference to TTMapView on which TTControlView should take control

    Declaration

    Objective-C

    @property(nonatomic, weak) TTMapView *_Nullable mapView

    Swift

    var mapView: UnsafeMutablePointer<Int32>? { get set }
  • Contains reference to active comapss button.

    Declaration

    Objective-C

    @property(nonatomic, weak, readonly) UIButton *_Nullable compassButton

    Swift

    var compassButton: UnsafeMutablePointer<Int32>? { get }
  • Contains reference to active center button.

    Declaration

    Objective-C

    @property(nonatomic, weak, readonly) UIButton *_Nullable centerButton

    Swift

    var centerButton: UnsafeMutablePointer<Int32>? { get }
  • Contains reference to active zooming buttons. Binding with map will be done automatically under the hood.

    Declaration

    Objective-C

    @property (nonatomic, weak) TTZoomView *_Nullable zoomView;

    Swift

    weak var zoomView: TTZoomView? { get set }
  • Contains reference to active control buttons. Binding with map will be done automatically under the hood.

    Declaration

    Objective-C

    @property (nonatomic, weak) TTPanControlView *_Nullable controlView;

    Swift

    weak var controlView: TTPanControlView? { get set }
  • @brief Block that gets called when centerButton`s visibility state should change.

    @discussion Could be used to customize fade in/out animation.

    Declaration

    Objective-C

    @property (copy) ButtonShowAndHideActionBlock _Nonnull centerButtonActionBlock;

    Swift

    var centerButtonActionBlock: ButtonShowAndHideActionBlock { get set }
  • @brief Block that gets called when compassButton`s visibility state should change.

    @discussion Could be used to customize fade in/out animation.

    Declaration

    Objective-C

    @property (copy) ButtonShowAndHideActionBlock _Nonnull compassButtonActionBlock;

    Swift

    var compassButtonActionBlock: ButtonShowAndHideActionBlock { get set }
  • Initialize default zoom view and adds it to UI.

    Declaration

    Objective-C

    - (void)initDefaultTTZoomView;

    Swift

    func initDefaultTTZoom()
  • Initialize default control view and adds it to UI.

    Declaration

    Objective-C

    - (void)initDefaultTTPanControlView;

    Swift

    func initDefaultTTPanControlView()
  • @brief Can be used to change centerButton to custom. Binding with map will be done automatically under the hood.

    Declaration

    Objective-C

    - (void)setCenterButton:(id)centerButton
        withDefaultConstraints:(BOOL)useDefaultConstraints;

    Swift

    func setCenterButton(_ centerButton: Any!, withDefaultConstraints useDefaultConstraints: Any!)

    Parameters

    centerButton

    that will be used for map centering.

    useDefaultConstraints

    pass false if you plan to set up your own constraints for centerButton.

  • @brief Can be used to change compassButton to custom. Binding with map will be done automatically under the hood.

    Declaration

    Objective-C

    - (void)setCompassButton:(id)compassButton
        withDefaultConstraints:(BOOL)useDefaultConstraints;

    Swift

    func setCompassButton(_ compassButton: Any!, withDefaultConstraints useDefaultConstraints: Any!)

    Parameters

    compassButton

    that will be used for compass.

    useDefaultConstraints

    pass false if you plan to set up your own constraints for compassButton.