From 6572471807e2e21292cb27d02c5954209c6393a3 Mon Sep 17 00:00:00 2001 From: Joonas Kerttula Date: Fri, 29 Nov 2024 13:31:36 +0200 Subject: [PATCH] Move view registration for navigation view as early as possible --- .../GoogleMapsNavigationView.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationView.swift b/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationView.swift index fa2d789..6c0afa9 100644 --- a/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationView.swift +++ b/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationView.swift @@ -89,13 +89,13 @@ public class GoogleMapsNavigationView: NSObject, FlutterPlatformView, ViewSettle _mapConfiguration.apply(to: _mapView) super.init() - - _navigationUIEnabledPreference = navigationUIEnabledPreference - applyNavigationUIEnabledPreference() - registerView() + _mapView.delegate = self _mapView.viewSettledDelegate = self + + _navigationUIEnabledPreference = navigationUIEnabledPreference + applyNavigationUIEnabledPreference() } deinit {