MMMNavigationPath

Objective-C

@interface MMMNavigationPath : NSObject

Swift

class MMMNavigationPath : NSObject

A navigation path is just a collection of one or more “hops”.

  • All the “hops” the link consists of.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<MMMNavigationHop *> *_Nonnull hops;

    Swift

    var hops: [MMMNavigationHop] { get }
  • A new path obtained from the current one by removing the first hop.

    Declaration

    Objective-C

    - (nullable MMMNavigationPath *)pathWithoutFirstHop;

    Swift

    func pathWithoutFirstHop() -> MMMNavigationPath?
  • The first hop in the path or nil if the path is empty.

    Declaration

    Objective-C

    - (nullable MMMNavigationHop *)firstHop;

    Swift

    func firstHop() -> MMMNavigationHop?
  • Undocumented

    Declaration

    Objective-C

    - (id)initWithHops:(NSArray<MMMNavigationHop *> *)hops NS_DESIGNATED_INITIALIZER;

    Swift

    init(hops: [MMMNavigationHop])
  • Convenience initializer. Allows to use URIs like “main/recipes”, to construct hops out of it. Note that it does not currently support hop parameters.

    Declaration

    Objective-C

    - (nonnull id)initWithURI:(nonnull NSString *)uri;

    Swift

    convenience init(uri: String)
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (id)init NS_UNAVAILABLE;