AI-generated Key Takeaways
-
GMSNavigationDirectionsListController
manages and displays a directions list, updating automatically based on an associated navigator's state. -
The
directionsListView
property provides access to the view displaying the directions, but it's lazy-loaded upon first access. -
This controller is initialized with a
GMSNavigator
instance which drives the list's content and updates. -
reloadData
andinvalidateLayout
methods allow for manual refreshing of the list data and layout, respectively, but are ineffective before thedirectionsListView
is accessed. -
Direct initialization using
init
is unavailable; instead, useinitWithNavigator:
to provide the necessary navigator instance.
GMSNavigationDirectionsListController
@interface GMSNavigationDirectionsListController : NSObject
A controller that manages and displays a directions list. The controller maintains its
own states internally based on the associated navigator
. The directionsListView
is updated
automatically based on navigator
states.
-
The view that displays the directions list. The view is lazy loaded when it is accessed for the first time.
Declaration
Swift
var directionsListView: UIView { get }
Objective-C
@property (nonatomic, readonly) UIView *_Nonnull directionsListView;
-
Initializes the controller with a
navigator
.Declaration
Swift
init(navigator: GMSNavigator)
Objective-C
- (nonnull instancetype)initWithNavigator:(nonnull GMSNavigator *)navigator;
Parameters
navigator
The controller automatically updates the list based on the current state of the
navigator
afterdirectionsListView
is accessed for the first time. -
Updates the data source from the latest
navigator
state and reload the list. Calling this method beforedirectionsListView
is accessed for the first time results in no-op.Declaration
Swift
func reloadData()
Objective-C
- (void)reloadData;
-
Invalidates the layout of the
directionsListView
. This should be called during events such as rotations and view size changes. Calling this method beforedirectionsListView
is accessed for the first time results in no-op.Declaration
Swift
func invalidateLayout()
Objective-C
- (void)invalidateLayout;
-
Unavailable
Use
-initWithNavigator:
instead.Declaration
Objective-C
- (null_unspecified instancetype)init;