TTCenterOnGeometryBuilder

Objective-C

@interface TTCenterOnGeometryBuilder : NSObject

Swift

class TTCenterOnGeometryBuilder : NSObject

Use this builder to create a TTCenterOnGeometry viewport transform tailored to your needs.

  • Unavailable

    Use the createWithGeometry method to create the builder.

    Declaration

    Objective-C

    - (instancetype _Nonnull)init;
  • Create the basic builder with a geometry array and a padding object.

    Declaration

    Objective-C

    + (TTCenterOnGeometryBuilder *_Nonnull)
        createWithGeometry:(NSArray<CLLocation *> *_Nonnull)geometry
               withPadding:(id)padding;

    Swift

    class func create(withGeometry geometry: [CLLocation], withPadding padding: Any!) -> TTCenterOnGeometryBuilder

    Parameters

    geometry

    An array of CLLocation objects, used to create the bounding box.

    padding

    An UIEdgeInsets object, used for padding.

    Return Value

    Reference to builder.

  • Add bearing for transform.

    Declaration

    Objective-C

    - (TTCenterOnGeometryBuilder *_Nonnull)withBearing:(double)bearing;

    Swift

    func withBearing(_ bearing: Double) -> TTCenterOnGeometryBuilder

    Parameters

    bearing

    An angle of bearing.

    Return Value

    Reference to builder.

  • Add pitch for transform.

    Declaration

    Objective-C

    - (TTCenterOnGeometryBuilder *_Nonnull)withPitch:(double)pitch;

    Swift

    func withPitch(_ pitch: Double) -> TTCenterOnGeometryBuilder

    Parameters

    pitch

    An angle of pitch.

    Return Value

    Reference to builder.

  • Build and get the TTCenterOnGeometry object.

    Declaration

    Objective-C

    - (TTCenterOnGeometry *_Nonnull)build;

    Swift

    func build() -> TTCenterOnGeometry

    Return Value

    TTCenterOnGeometry object, made with parameters that you provided to the builder.