diff --git a/ios/RNSScreenStack.mm b/ios/RNSScreenStack.mm index 61fe072086..52ef55060a 100644 --- a/ios/RNSScreenStack.mm +++ b/ios/RNSScreenStack.mm @@ -71,7 +71,7 @@ - (void)viewDidLayoutSubviews // If RNSScreen includes a navigation controller of type RNSNavigationController, it should not calculate // header height, as it could have nested stack. if (![screenController hasNestedStack]) { - [(RNSScreen *)self.topViewController calculateAndNotifyHeaderHeightChangeIsModal:NO]; + [screenController calculateAndNotifyHeaderHeightChangeIsModal:NO]; } } }