提交 1f03d60a 编写于 作者: C Chinmay Garde 提交者: GitHub

Delay setting up the accessibility bridge till after the flutter view has appeared. (#2854)

上级 3096a05a
......@@ -243,8 +243,6 @@ static void DynamicServiceResolve(void* baton,
self.view.autoresizingMask =
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self onVoiceOverChanged:nil];
[surface release];
}
......@@ -381,10 +379,9 @@ static inline PointerTypeMapperPhase PointerTypePhaseFromUITouchPhase(
[UIApplication sharedApplication].statusBarFrame.size.height * scale;
_engine->OnViewportMetricsChanged(_viewportMetrics.Clone());
[self onLocaleUpdated:nil];
}
#pragma mark - Keyboard events
- (void)keyboardWasShown:(NSNotification*)notification {
......@@ -444,7 +441,7 @@ static inline PointerTypeMapperPhase PointerTypePhaseFromUITouchPhase(
bool enable = UIAccessibilityIsVoiceOverRunning();
#endif
if (enable) {
if (!_accessibilityBridge) {
if (!_accessibilityBridge && _dartServices.get() != nullptr) {
_accessibilityBridge.reset(
new sky::shell::AccessibilityBridge(self.view, _dartServices.get()));
}
......@@ -476,6 +473,8 @@ static inline PointerTypeMapperPhase PointerTypePhaseFromUITouchPhase(
- (void)viewDidAppear:(BOOL)animated {
[self surfaceUpdated:YES];
[self onLocaleUpdated:nil];
[self onVoiceOverChanged:nil];
[super viewWillAppear:animated];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册