Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix splitView options #4647

Merged
merged 6 commits into from
Feb 4, 2019
Merged

Fix splitView options #4647

merged 6 commits into from
Feb 4, 2019

Conversation

zzorba
Copy link
Contributor

@zzorba zzorba commented Jan 27, 2019

This change brings the SplitView controller in line with the rest of the V2 refactor. Introduces a new Presenter and an intermediate UISplitViewController+Options to apply changes.

I tested all 4 options, including with mergeOptions, and it seems to behave as expected.

@zzorba
Copy link
Contributor Author

zzorba commented Jan 28, 2019

So this seems to work -- though there appears to be something off with teh combination of split view + tab (but it might be a preexisting issue).

image

It seems to be related to the spacing for the bottom tab bar if I weld off the following bit of code in UIViewController+RNNOptions.h

- (void)rnn_setDrawBehindTabBar:(BOOL)drawBehindTabBar {
	if (drawBehindTabBar) {
		[self setExtendedLayoutIncludesOpaqueBars:YES];
		self.edgesForExtendedLayout |= UIRectEdgeBottom;
	} else {
		self.edgesForExtendedLayout &= ~UIRectEdgeBottom;
	}
}

to always execute the drawBehindTabBar=true path, then the extra spacing goes away. I think what should happen is the childViewControllers need to act as if they are NOT in a tab bar (from a height calculation POV), but I don't know the best way to achieve that.

@guyca guyca requested a review from yogevbd January 28, 2019 09:48
@guyca guyca added this to the tbd milestone Jan 28, 2019
@guyca guyca merged commit 00d5e31 into wix:master Feb 4, 2019
@exentrich
Copy link

Great feature! Thank very much!
I found several problems:

  • statusBar.style option is ignored, global too
  • Can we customize border between master and detail? Show/hide is enough.
  • App is crashed on iPad when it started or moved to "split view" - when two apps showed simultaneously (for example 80% of screen is Safari, 20% my app)

vshkl pushed a commit to vshkl/react-native-navigation that referenced this pull request Feb 5, 2020
Seems like RNNSplitViewOptions wasn't updated to use the presenters, so
the options were going nowhere.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants