AI-generated Key Takeaways
-
GMSNavigationDirectionsListControllermanages and displays a directions list, updating automatically based on an associated navigator's state. -
The
directionsListViewproperty provides access to the view displaying the directions, but it's lazy-loaded upon first access. -
This controller is initialized with a
GMSNavigatorinstance which drives the list's content and updates. -
reloadDataandinvalidateLayoutmethods allow for manual refreshing of the list data and layout, respectively, but are ineffective before thedirectionsListViewis accessed. -
Direct initialization using
initis unavailable; instead, useinitWithNavigator:to provide the necessary navigator instance.
GMSNavigationDirectionsListController
@interface GMSNavigationDirectionsListController : NSObjectA 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
navigatorThe controller automatically updates the list based on the current state of the
navigatorafterdirectionsListViewis accessed for the first time. -
Updates the data source from the latest
navigatorstate and reload the list. Calling this method beforedirectionsListViewis 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 beforedirectionsListViewis 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;