-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the blur effect to the SheetStyle options
- Loading branch information
1 parent
5067898
commit 51b4b47
Showing
4 changed files
with
64 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// BlurEffectView.swift | ||
// PartialSheetExample | ||
// | ||
// Created by Andrea Miotto on 30/4/20. | ||
// Copyright © 2020 Swift. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
/// An UIViewRepresentable for the UIBlurEffectView | ||
struct BlurEffectView: UIViewRepresentable { | ||
|
||
/// The style of the Blut Effect View | ||
var style: UIBlurEffect.Style = .systemMaterial | ||
|
||
func makeUIView(context: Context) -> UIVisualEffectView { | ||
return UIVisualEffectView(effect: UIBlurEffect(style: style)) | ||
} | ||
|
||
func updateUIView(_ uiView: UIVisualEffectView, context: Context) { | ||
uiView.effect = UIBlurEffect(style: style) | ||
} | ||
} |
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