-
Notifications
You must be signed in to change notification settings - Fork 44
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
New corner option: alwaysShowBelowStatusBar. #61
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,18 @@ public struct DrawerConfiguration { | |
} | ||
} | ||
|
||
public enum CornerAnimationOption { | ||
/// The corners would be at its maximum radius when the drawer is | ||
/// partially expanded, and shrink as the drawer moves away in either | ||
/// direction. | ||
case maximumAtPartialY | ||
|
||
/// The corners would be always shown below the status bar at its | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... at their... |
||
/// maximum radius, and shrink only as the drawer moves into the frame | ||
/// of the status bar towards the top screen edge. | ||
case alwaysShowBelowStatusBar | ||
} | ||
|
||
/// The total duration, in seconds, for the drawer to transition from its | ||
/// collapsed state to its fully-expanded state, or vice-versa. The default | ||
/// value is 0.4 seconds. | ||
|
@@ -127,6 +139,10 @@ public struct DrawerConfiguration { | |
/// corners, from 0 to the value of this property. Setting this to 0 prevents any | ||
/// corner animations from taking place. The default value is 15 points. | ||
public var maximumCornerRadius: CGFloat | ||
|
||
/// How the drawer should animate its corner radius if specified. The | ||
/// default value is `maximumAtPartialY`. | ||
public var cornerAnimationOption: CornerAnimationOption | ||
|
||
/// The configuration options for the handle view, should it be shown. Set this | ||
/// property to `nil` to hide the handle view. The default value is | ||
|
@@ -156,6 +172,7 @@ public struct DrawerConfiguration { | |
upperMarkGap: CGFloat = 40, | ||
lowerMarkGap: CGFloat = 40, | ||
maximumCornerRadius: CGFloat = 15, | ||
cornerAnimationOption: CornerAnimationOption = .maximumAtPartialY, | ||
handleViewConfiguration: HandleViewConfiguration? = HandleViewConfiguration(), | ||
drawerBorderConfiguration: DrawerBorderConfiguration? = nil, | ||
drawerShadowConfiguration: DrawerShadowConfiguration? = nil) { | ||
|
@@ -181,6 +198,7 @@ public struct DrawerConfiguration { | |
self.upperMarkGap = max(0, upperMarkGap) | ||
self.lowerMarkGap = max(0, lowerMarkGap) | ||
self.maximumCornerRadius = max(0, maximumCornerRadius) | ||
self.cornerAnimationOption = cornerAnimationOption | ||
self.handleViewConfiguration = handleViewConfiguration | ||
self.drawerBorderConfiguration = drawerBorderConfiguration | ||
self.drawerShadowConfiguration = drawerShadowConfiguration | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The corners would be at
itstheir maximum radius when the drawer is..."