-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move description api from kit to example project
- Loading branch information
Showing
7 changed files
with
32 additions
and
36 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
21 changes: 21 additions & 0 deletions
21
ExampleProject/ExampleProject/example/ext/NavigationSplitViewStyle+Ext.swift
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import SwiftUI | ||
|
||
extension NavigationSplitViewStyle { | ||
/** | ||
* Used to debug navigationSplitViewStyle (not in use atm) | ||
* - Note: `.automatic` will use switch between ballanced and detailProminent, .detailProminent will make detail fullscreen, and other columns hover over. (automatic is easy to implement, balanced looks better, but you have to account for responsive break-points your self, setting minWidth to children just gets clipped, no effect on parent column etc) | ||
* - Note: We don't use navigationSplitViewStyle as a state because we only set it at setup. | ||
* - Note: We keep this in the example project to keep the kit code as small as possible | ||
*/ | ||
internal var description: String { | ||
switch true { | ||
// **Balanced**: This style reduces the size of the detail view to accommodate the leading columns side-by-side. | ||
case self is BalancedNavigationSplitViewStyle: "balanced" | ||
// **Prominent Detail**: This style maintains the size of the detail view, with the leading columns overlayed on top of it. | ||
case self is ProminentDetailNavigationSplitViewStyle: "prominent" | ||
// **Automatic**: This is the default setting, providing a context-specific style. | ||
case self is AutomaticNavigationSplitViewStyle: "automatic" | ||
default: "Case not covered" | ||
} | ||
} | ||
} |
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
19 changes: 0 additions & 19 deletions
19
Sources/SplitViewKit/ext/NavigationSplitViewStyle+Ext.swift
This file was deleted.
Oops, something went wrong.
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