File tree Expand file tree Collapse file tree 6 files changed +27
-28
lines changed Expand file tree Collapse file tree 6 files changed +27
-28
lines changed Original file line number Diff line number Diff line change 1
1
# Change Log
2
2
All notable changes to this project will be documented in this file.
3
3
4
+ ## 9.0.8
5
+
6
+ ### Changes
7
+
8
+ * #529 Update readme and SwiftUI demo to demostrate how to mask edges.
9
+
4
10
## 9.0.7
5
11
6
12
### Features
Original file line number Diff line number Diff line change @@ -208,8 +208,14 @@ struct DemoMessageView: View {
208
208
.padding(30)
209
209
.frame(maxWidth: .infinity)
210
210
.background(.gray)
211
- .cornerRadius(15)
212
- .padding(15)
211
+ // This makes a tab-style view where the bottom corners are rounded and the view's background
212
+ // extends to the top edge.
213
+ .mask(
214
+ UnevenRoundedRectangle(
215
+ cornerRadii: .init(bottomLeading: 15, bottomTrailing: 15)
216
+ )
217
+ .edgesIgnoringSafeArea(.top)
218
+ )
213
219
}
214
220
}
215
221
````
Original file line number Diff line number Diff line change 1
1
Pod ::Spec . new do |spec |
2
2
spec . name = 'SwiftMessages'
3
- spec . version = '9.0.7 '
3
+ spec . version = '9.0.8 '
4
4
spec . license = { :type => 'MIT' }
5
5
spec . homepage = 'https://github.com/SwiftKickMobile/SwiftMessages'
6
6
spec . authors = { 'Timothy Moose' => 'tim@swiftkickmobile.com' }
Original file line number Diff line number Diff line change 58
58
228F7DBD2ACF1E1E006C9644 /* SwiftMessages.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SwiftMessages.xcodeproj; path = ../SwiftMessages.xcodeproj; sourceTree = "<group>"; };
59
59
228F7DD42ACF59E4006C9644 /* DemoMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoMessage.swift; sourceTree = "<group>"; };
60
60
228F7DD62ACF5C2E006C9644 /* DemoMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoMessageView.swift; sourceTree = "<group>"; };
61
+ 2291AA492AD1E3EC0084868E /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
62
+ 2291AA4C2AD1E4520084868E /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CHANGELOG.md; path = ../CHANGELOG.md; sourceTree = "<group>"; };
61
63
/* End PBXFileReference section */
62
64
63
65
/* Begin PBXFrameworksBuildPhase section */
75
77
228F7DA02ACF17E8006C9644 = {
76
78
isa = PBXGroup;
77
79
children = (
80
+ 2291AA4C2AD1E4520084868E /* CHANGELOG.md */,
81
+ 2291AA492AD1E3EC0084868E /* README.md */,
78
82
228F7DAB2ACF17E8006C9644 /* SwiftUIDemo */,
79
83
228F7DAA2ACF17E8006C9644 /* Products */,
80
84
228F7DC72ACF1E63006C9644 /* Frameworks */,
Original file line number Diff line number Diff line change @@ -28,8 +28,13 @@ struct DemoMessageView: View {
28
28
. padding ( 30 )
29
29
. frame ( maxWidth: . infinity)
30
30
. background ( . demoMessageBackground)
31
- . cornerRadius ( 15 )
32
- . padding ( 15 )
31
+ // This makes a tab-style view where the bottom corners are rounded and the view's background
32
+ // extends to the top edge.
33
+ . mask (
34
+ UnevenRoundedRectangle (
35
+ cornerRadii: . init( bottomLeading: 15 , bottomTrailing: 15 )
36
+ )
37
+ . edgesIgnoringSafeArea ( . top)
38
+ )
33
39
}
34
40
}
35
-
Original file line number Diff line number Diff line change @@ -24,25 +24,3 @@ struct DemoView: View {
24
24
#Preview {
25
25
DemoView ( )
26
26
}
27
-
28
- struct DemoViewx : View {
29
- var body : some View {
30
- Button ( " Show message " ) {
31
- let message = DemoMessage ( title: " Demo " , body: " SwiftUI forever! " )
32
- let messageView = MessageHostingView ( message: message)
33
- SwiftMessages . show ( view: messageView)
34
- }
35
- }
36
- }
37
-
38
- struct DemoViewy : View {
39
-
40
- @State var message : DemoMessage ?
41
-
42
- var body : some View {
43
- Button ( " Show message " ) {
44
- message = DemoMessage ( title: " Demo " , body: " SwiftUI forever! " )
45
- }
46
- . swiftMessage ( message: $message)
47
- }
48
- }
You can’t perform that action at this time.
0 commit comments