ارفع راسك فوق انته سوري حر ...
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CamScanner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
George
CamScanner
Commits
689ad546
Commit
689ad546
authored
11 months ago
by
Mustafa Merza
Browse files
Options
Downloads
Patches
Plain Diff
- Added detents parameter for iOS 15 devices.
parent
1b3c0d45
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
MiniScanner/Extensions/View/Sheet/View+CustomSheet.swift
+4
-1
4 additions, 1 deletion
MiniScanner/Extensions/View/Sheet/View+CustomSheet.swift
MiniScanner/Features/Settings/Presentation/SettingsView.swift
+4
-0
4 additions, 0 deletions
...Scanner/Features/Settings/Presentation/SettingsView.swift
with
8 additions
and
1 deletion
MiniScanner/Extensions/View/Sheet/View+CustomSheet.swift
+
4
−
1
View file @
689ad546
...
...
@@ -13,6 +13,7 @@ struct CustomSheetModifier<SheetContent: View>: ViewModifier {
var
isPresented
:
Binding
<
Bool
>
var
dismissable
:
Bool
=
true
var
height
:
CGFloat
var
detents
:
[
BottomSheet
.
Detent
]
@ViewBuilder
var
sheetContent
:
()
->
SheetContent
func
body
(
content
:
Content
)
->
some
View
{
...
...
@@ -40,6 +41,7 @@ struct CustomSheetModifier<SheetContent: View>: ViewModifier {
content
.
bottomSheet
(
isPresented
:
isPresented
,
detents
:
detents
,
shouldScrollExpandSheet
:
true
,
showGrabber
:
false
,
showNavigationBar
:
true
,
...
...
@@ -53,8 +55,9 @@ extension View {
func
customSheet
<
Content
:
View
>
(
isPresented
:
Binding
<
Bool
>
,
dismissable
:
Bool
=
true
,
height
:
CGFloat
,
detents
:
[
BottomSheet
.
Detent
],
@ViewBuilder
content
:
@escaping
()
->
Content
)
->
some
View
{
ModifiedContent
(
content
:
self
,
modifier
:
CustomSheetModifier
(
isPresented
:
isPresented
,
dismissable
:
dismissable
,
height
:
height
,
sheetContent
:
content
))
ModifiedContent
(
content
:
self
,
modifier
:
CustomSheetModifier
(
isPresented
:
isPresented
,
dismissable
:
dismissable
,
height
:
height
,
detents
:
detents
,
sheetContent
:
content
))
}
}
This diff is collapsed.
Click to expand it.
MiniScanner/Features/Settings/Presentation/SettingsView.swift
+
4
−
0
View file @
689ad546
...
...
@@ -33,24 +33,28 @@ struct SettingsView: View {
.
environment
(\
.
layoutDirection
,
viewModel
.
layoutDirection
)
.
customSheet
(
isPresented
:
$viewModel
.
isLanguageSettingSheetPresented
,
height
:
viewModel
.
sheetSize
.
height
,
detents
:
[
.
medium
],
content
:
{
languageSheet
.
readSize
(
size
:
$viewModel
.
sheetSize
)
})
.
customSheet
(
isPresented
:
$viewModel
.
isColorSchemeSettingSheetPresented
,
height
:
viewModel
.
sheetSize
.
height
,
detents
:
[
.
medium
],
content
:
{
colorSchemeSheet
.
readSize
(
size
:
$viewModel
.
sheetSize
)
})
.
customSheet
(
isPresented
:
$viewModel
.
isFileTypeSettingSheetPresented
,
height
:
viewModel
.
sheetSize
.
height
,
detents
:
[
.
medium
],
content
:
{
fileTypeSheet
.
readSize
(
size
:
$viewModel
.
sheetSize
)
})
.
customSheet
(
isPresented
:
$viewModel
.
isScreenSettingSheetPresented
,
height
:
viewModel
.
sheetSize
.
height
,
detents
:
[
.
medium
],
content
:
{
screenSheet
.
readSize
(
size
:
$viewModel
.
sheetSize
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment