Loading...
Searching...
No Matches

Ready-to-use navigation view with built-in UI: “follow me” toggle and user location layer. zoom controls, floor selector, follow me toggle and user location layer. Automatically wires SDK listeners (location, sublocation, camera) and keeps widgets in sync. Use NCDefaultNavigationViewConfig to customize; config can be updated at runtime via the config property. More...

#include <com/navigine/idl/objc/NCDefaultNavigationView.h>

+ Inheritance diagram for NCDefaultNavigationView:

Instance Methods

(id) - initWithCoder:
 Initializes a location view from Interface Builder / storyboard.
 
(id) - initWithFrame:
 Creates a location view with the specified frame.
 
(id) - initWithFrame:config:
 Creates a location view with the specified frame and view config (visibility only).
 
(id) - initWithFrame:viewConfig:zoomConfig:followMeConfig:floorConfig:
 Creates a location view with the specified frame and configs. Widget configs are passed directly; nil = use defaults.
 

Properties

NCDefaultNavigationViewConfigviewConfig
 View config (visibility). Can be changed at runtime.
 
NCZoomControlsConfigzoomControlsConfig
 Zoom controls config. Can be changed at runtime.
 
NCFollowMeButtonConfigfollowMeButtonConfig
 Follow me button config. Can be changed at runtime.
 
NCFloorSelectorViewConfigfloorSelectorConfig
 Floor selector config. Can be changed at runtime.
 
NCFloorSelectorViewfloorSelectorView
 Direct access for advanced customization (read-only). May be nil if widget is hidden.
 
NCZoomControlszoomControls
 
NCFollowMeButtonfollowMeButton
 
NCLocationWindowlocationWindow
 location view's main class.
 

Detailed Description

Ready-to-use navigation view with built-in UI: “follow me” toggle and user location layer. zoom controls, floor selector, follow me toggle and user location layer. Automatically wires SDK listeners (location, sublocation, camera) and keeps widgets in sync. Use NCDefaultNavigationViewConfig to customize; config can be updated at runtime via the config property.

Basic usage with default config:

// Create with default config
let view = NCDefaultNavigationView(frame: frame)

Objective C code snippet:

// Create with default config
NCDefaultNavigationView *view = [[NCDefaultNavigationView alloc] initWithFrame:frame];

Custom config at init (visibility, colors, icons) via NCDefaultNavigationViewConfig:

Swift code snippet:

// Create with custom configs (configs passed directly)
let viewConfig = NCDefaultNavigationViewConfig.defaultConfig()
viewConfig.visibleWidgets = [.zoomControls, .followMeButton] // hide floor selector
let followMeConfig = NCFollowMeButtonConfig.defaultConfig()
followMeConfig.accentColor = UIColor(red: 48/255, green: 170/255, blue: 217/255, alpha: 1) // 0xFF30AAD9
let customView = NCDefaultNavigationView(frame: frame, viewConfig: viewConfig, zoomConfig: nil, followMeConfig: followMeConfig, floorConfig: nil)

Objective C code snippet:

// Create with custom configs (configs passed directly)
NCDefaultNavigationViewConfig *viewConfig = [NCDefaultNavigationViewConfig defaultConfig];
viewConfig.visibleWidgets = NCNavigationWidgetVisibilityZoomControls | NCNavigationWidgetVisibilityFollowMeButton; // hide floor selector
NCFollowMeButtonConfig *followMeConfig = [NCFollowMeButtonConfig defaultConfig];
followMeConfig.accentColor = [UIColor colorWithRed:48/255.0 green:170/255.0 blue:217/255.0 alpha:1]; // 0xFF30AAD9
NCDefaultNavigationView *customView = [[NCDefaultNavigationView alloc] initWithFrame:frame
viewConfig:viewConfig
zoomConfig:nil
followMeConfig:followMeConfig
floorConfig:nil];

Runtime config update:

Swift code snippet:

let view = NCDefaultNavigationView(frame: .zero)
let newViewConfig = NCDefaultNavigationViewConfig.defaultConfig()
newViewConfig.visibleWidgets = .followMeButton
let newFollowMeConfig = NCFollowMeButtonConfig.defaultConfig()
newFollowMeConfig.accentColor = UIColor(red: 1, green: 0, blue: 0, alpha: 1) // 0xFFFF0000
view.setConfig(viewConfig: newViewConfig, zoomConfig: nil, followMeConfig: newFollowMeConfig, floorConfig: nil)

Objective C code snippet:

NCDefaultNavigationView *view = [[NCDefaultNavigationView alloc] initWithFrame:CGRectZero];
NCDefaultNavigationViewConfig *newViewConfig = [NCDefaultNavigationViewConfig defaultConfig];
newViewConfig.visibleWidgets = NCNavigationWidgetVisibilityFollowMeButton;
NCFollowMeButtonConfig *newFollowMeConfig = [NCFollowMeButtonConfig defaultConfig];
newFollowMeConfig.accentColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1]; // 0xFFFF0000
[view setConfigWithViewConfig:newViewConfig zoomConfig:nil followMeConfig:newFollowMeConfig floorConfig:nil];

Direct widget access for advanced customization:

Swift code snippet:

let view = NCDefaultNavigationView(frame: .zero)
let floorSelector = view.floorSelectorView
let zoomControls = view.zoomControls
let followButton = view.followMeButton
// Use for advanced customization (may be nil if widget is hidden)

Objective C code snippet:

NCDefaultNavigationView *view = [[NCDefaultNavigationView alloc] initWithFrame:CGRectZero];
NCFloorSelectorView *floorSelector = view.floorSelectorView;
NCZoomControls *zoomControls = view.zoomControls;
NCFollowMeButton *followButton = view.followMeButton;
// Use for advanced customization (may be nil if widget is hidden)

Definition at line 68 of file NCDefaultNavigationView.h.

Method Documentation

◆ initWithCoder:

- (id) initWithCoder: (NSCoder *) aDecoder

Initializes a location view from Interface Builder / storyboard.

Implements NCLocationView.

◆ initWithFrame:

- (id) initWithFrame: (CGRect) frame

Creates a location view with the specified frame.

Swift code snippet:

// Create with default config
let view = NCDefaultNavigationView(frame: frame)

Objective C code snippet:

// Create with default config
NCDefaultNavigationView *view = [[NCDefaultNavigationView alloc] initWithFrame:frame];

Implements NCLocationView.

◆ initWithFrame:config:

- (id) initWithFrame: (CGRect) frame
config: (nullable NCDefaultNavigationViewConfig *) config 

Creates a location view with the specified frame and view config (visibility only).

Parameters
frameThe frame rectangle.
configOptional view config. nil = use default.

Swift code snippet:

// Create with custom configs (configs passed directly)
let viewConfig = NCDefaultNavigationViewConfig.defaultConfig()
viewConfig.visibleWidgets = [.zoomControls, .followMeButton] // hide floor selector
let followMeConfig = NCFollowMeButtonConfig.defaultConfig()
followMeConfig.accentColor = UIColor(red: 48/255, green: 170/255, blue: 217/255, alpha: 1) // 0xFF30AAD9
let customView = NCDefaultNavigationView(frame: frame, viewConfig: viewConfig, zoomConfig: nil, followMeConfig: followMeConfig, floorConfig: nil)

Objective C code snippet:

// Create with custom configs (configs passed directly)
NCDefaultNavigationViewConfig *viewConfig = [NCDefaultNavigationViewConfig defaultConfig];
viewConfig.visibleWidgets = NCNavigationWidgetVisibilityZoomControls | NCNavigationWidgetVisibilityFollowMeButton; // hide floor selector
NCFollowMeButtonConfig *followMeConfig = [NCFollowMeButtonConfig defaultConfig];
followMeConfig.accentColor = [UIColor colorWithRed:48/255.0 green:170/255.0 blue:217/255.0 alpha:1]; // 0xFF30AAD9
NCDefaultNavigationView *customView = [[NCDefaultNavigationView alloc] initWithFrame:frame
viewConfig:viewConfig
zoomConfig:nil
followMeConfig:followMeConfig
floorConfig:nil];

◆ initWithFrame:viewConfig:zoomConfig:followMeConfig:floorConfig:

- (id) initWithFrame: (CGRect) frame
viewConfig: (nullable NCDefaultNavigationViewConfig *) viewConfig
zoomConfig: (nullable NCZoomControlsConfig *) zoomConfig
followMeConfig: (nullable NCFollowMeButtonConfig *) followMeConfig
floorConfig: (nullable NCFloorSelectorViewConfig *) floorConfig 

Creates a location view with the specified frame and configs. Widget configs are passed directly; nil = use defaults.

Property Documentation

◆ floorSelectorConfig

- (NCFloorSelectorViewConfig*) floorSelectorConfig
readwritenonatomicstrong

Floor selector config. Can be changed at runtime.

Definition at line 118 of file NCDefaultNavigationView.h.

◆ floorSelectorView

- (NCFloorSelectorView*) floorSelectorView
readnonatomicassign

Direct access for advanced customization (read-only). May be nil if widget is hidden.

Swift code snippet:

let view = NCDefaultNavigationView(frame: .zero)
let floorSelector = view.floorSelectorView
let zoomControls = view.zoomControls
let followButton = view.followMeButton
// Use for advanced customization (may be nil if widget is hidden)

Objective C code snippet:

NCDefaultNavigationView *view = [[NCDefaultNavigationView alloc] initWithFrame:CGRectZero];
NCFloorSelectorView *floorSelector = view.floorSelectorView;
NCZoomControls *zoomControls = view.zoomControls;
NCFollowMeButton *followButton = view.followMeButton;
// Use for advanced customization (may be nil if widget is hidden)

Definition at line 130 of file NCDefaultNavigationView.h.

◆ followMeButton

- (NCFollowMeButton*) followMeButton
readnonatomicassign

Definition at line 132 of file NCDefaultNavigationView.h.

◆ followMeButtonConfig

- (NCFollowMeButtonConfig*) followMeButtonConfig
readwritenonatomicstrong

Follow me button config. Can be changed at runtime.

Definition at line 116 of file NCDefaultNavigationView.h.

◆ locationWindow

- (NCLocationWindow*) locationWindow
readnonatomicassigninherited

location view's main class.

Class is used to interact with the view.

Definition at line 48 of file NCLocationView.h.

◆ viewConfig

- (NCDefaultNavigationViewConfig*) viewConfig
readwritenonatomicstrong

View config (visibility). Can be changed at runtime.

Definition at line 112 of file NCDefaultNavigationView.h.

◆ zoomControls

- (NCZoomControls*) zoomControls
readnonatomicassign

Definition at line 131 of file NCDefaultNavigationView.h.

◆ zoomControlsConfig

- (NCZoomControlsConfig*) zoomControlsConfig
readwritenonatomicstrong

Zoom controls config. Can be changed at runtime.

Definition at line 114 of file NCDefaultNavigationView.h.


The documentation for this class was generated from the following file: