-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add primaryBackgroundStyle option to splitView (#6419)
This PR adds the primaryBackgroundStyle option in splitView to enable translucent sidebars when developing Mac Catalyst apps. Like splitView it's iOS only and requires iOS 13+, the moment it seems to only have an effect on Mac apps and not affect apps running on iOS, see: https://developer.apple.com/documentation/uikit/uisplitviewcontroller/3238075-primarybackgroundstyle The following layout ```typescript Navigation.events().registerAppLaunchedListener(() => { Navigation.setDefaultOptions({ layout: { backgroundColor: 'transparent', componentBackgroundColor: 'transparent', }, topBar: { background: {translucent: true, blur: true}, visible: false, }, }); Navigation.setRoot({ root: { splitView: { master: { stack: { children: [ { component: { name: 'Sidebar', }, }, ], }, }, detail: { stack: { children: [ { component: { name: 'Main', }, }, ], }, }, options: { displayMode: 'visible', splitView: { primaryBackgroundStyle: 'sidebar', } }, }, }, }); }); ``` will produce something like this: ![Screen Shot 2020-07-22 at 17 20 09](https://user-images.githubusercontent.com/35420/88197440-c8faaa00-cc42-11ea-8dec-eab33cbb48ea.png)
- Loading branch information
Showing
8 changed files
with
87 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,6 @@ | |
|
||
- (void)rnn_setMaxWidth:(Number *)maxWidth; | ||
|
||
- (void)rnn_setPrimaryBackgroundStyle:(NSString *)style; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters