Compare commits

..

2 Commits

Author SHA1 Message Date
Krzysztof Magiera
1aeba7faa1 Bump version -> 2.0.0-beta.6 2020-02-17 17:09:13 +01:00
Krzysztof Magiera
e6ed4176cd Fix condition that detected whether we should update screen fram… (#336)
The previous condition was broken as under certain circumstances we would've receive a setReactFrame with no active screen rendered to only get the screen activate in a while. This resulted in the view dimention not being properly updated. This diff changes the condition and verifies whether a screen is mounted under UINavController or not. When not, we assume it is mounted under regular screen container and allow the frame to be adjusted from react.
2020-02-17 17:08:52 +01:00
2 changed files with 9 additions and 4 deletions

View File

@@ -34,11 +34,16 @@
- (void)reactSetFrame:(CGRect)frame
{
if (_active) {
if (![self.reactViewController.parentViewController
isKindOfClass:[UINavigationController class]]) {
[super reactSetFrame:frame];
}
// ignore setFrame call from react, the frame of this view
// is controlled by the UIViewController it is contained in
// when screen is mounted under UINavigationController it's size is controller
// by the navigation controller itself. That is, it is set to fill space of
// the controller. In that case we ignore react layout system from managing
// the screen dimentions and we wait for the screen VC to update and then we
// pass the dimentions to ui view manager to take into account when laying out
// subviews
}
- (void)updateBounds

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-screens",
"version": "2.0.0-beta.5",
"version": "2.0.0-beta.6",
"description": "First incomplete navigation solution for your react-native app.",
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",