Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nikstar authored Jul 30, 2024
1 parent 1a58404 commit 41698ee
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

![VariableBlur](https://github.com/user-attachments/assets/accdd9d2-4c8a-4970-bce0-00842a47ff87)

# VariableBlur

SwiftUI variable blur (progressive blur)
Expand All @@ -14,6 +16,7 @@ Changes in this version:

Use of private API did not trigger App Store rejection for me but do tell if it does for you.


## Install

### Recommended
Expand All @@ -26,10 +29,32 @@ To add a package dependency to your Xcode project, select File > Add Package and

## Example

At top matching cutout safety area:
Used to create image on top of this page:

```swift
ZStack(alignment: .top) {
Color.white
Color.blue.opacity(0.3)
Image("im")
.resizable()
.aspectRatio(contentMode: .fit)
.padding(.horizontal, 50)
Text("VariableBlur")
.font(.largeTitle.monospaced().weight(.bold))
.padding(.top, 230)
.foregroundStyle(.white.opacity(0.9))
}
.overlay(alignment: .top) {
VariableBlurView(maxBlurRadius: 20, direction: .blurredTopClearBottom)
.frame(height: 200)
}
.ignoresSafeArea()
```

Blur matching status bar/cutout safe area:

```swift
MyContentView()
ContentView()
.overlay(alignment: .top) {
GeometryReader { geom in
VariableBlurView(maxBlurRadius: 10)
Expand Down

0 comments on commit 41698ee

Please sign in to comment.