Skip to content

Commit c0ff6c6

Browse files
committed
Release prep
1 parent 6010bc7 commit c0ff6c6

File tree

3 files changed

+74
-5
lines changed

3 files changed

+74
-5
lines changed

CHANGELOG.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4-
## 10.0.1
4+
## 10.0.2
55

6-
## Features
6+
### Features
7+
* #549 Create a formal dismissal mechanism for SwiftUI message. Use `@Environment(\.swiftMessagesHide) private var hide` then call `hide(animated: true)` to dismiss.
8+
* #571 PhysicsPanHandler.swift make configure public.
9+
10+
### Fixes
11+
* #581 [BUG]: SwiftUI message views don't respond to touch input on Xcode 26 beta 6 iOS 26 simulator.
12+
* #581 [BUG]: SwiftUI message views don't respond to touch input on Xcode 26 beta 6 iOS 26 simulator
13+
* #577 Hide Background Elements from Modal SwiftMessage in VoiceOver mode
14+
* #578 Fix crash on iPadOS 18+ when presenting bottom SwiftMessage above UITabBarController
15+
16+
### Features
717

818
* #523 Add a `priority` configuration option.
919
* #548 Adds 'TopBottomPresentable' protocol to allow animators implementation to reuse 'top/bottom' integration in presentation
1020
* #543 Make the `SwiftMessages` initializer `nonisolated` to improve interoperability with dependency injection frameworks like Factory.
1121
* #560 Add a new `swiftMessage` modifier variation that provides a ` MessageGeometryProxy` type to the message view builder—this works around an inssue with `GeometryReader` not working in `UIHostingController`.
1222

13-
Fixes
23+
### Fixes
1424
* Fix broken touch handling in iOS 18.
1525

1626
## 10.0.0

README.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
## Overview
1414

15-
🔥🔥🔥 **NEW** SwiftUI support added!
15+
🔥🔥🔥 **UPDATE** SwiftUI support in in Xcode 26 requries 10.0.2!
1616

1717
SwiftMessages is a very flexible view and view controller presentation library for UIKit and SwiftUI.
1818

@@ -181,6 +181,8 @@ And check out our blog post [Elegant Custom UIViewController Transitioning](http
181181
182182
Any of the built-in SwiftMessages views can be displayed by calling the SwiftMessages APIs from within observable object, a button action closure, etc. However, SwiftMessages can also display your custom SwiftUI views.
183183
184+
#### Presentation
185+
184186
Take the following message view and companion data model:
185187
186188
````swift
@@ -276,6 +278,63 @@ struct DemoView: View {
276278
}
277279
````
278280
281+
#### Dismissal
282+
283+
SwiftMessages provides several approaches for dismissing messages from within SwiftUI views.
284+
285+
For messages shown using the `swiftMessage()` modifier, you can dismiss by setting the binding to `nil`:
286+
287+
````swift
288+
struct DemoView: View {
289+
@State var message: DemoMessage?
290+
291+
var body: some View {
292+
VStack {
293+
Button("Show message") {
294+
message = DemoMessage(title: "Demo", body: "SwiftUI forever!")
295+
}
296+
Button("Hide message") {
297+
message = nil // Dismisses the message
298+
}
299+
}
300+
.swiftMessage(message: $message) { message in
301+
DemoMessageView(message: message)
302+
}
303+
}
304+
}
305+
````
306+
307+
For messages that need to dismiss themselves, SwiftMessages provides a SwiftUI-style environment action:
308+
309+
````swift
310+
struct SelfDismissingMessageView: View {
311+
@Environment(\.swiftMessagesHide) private var hide
312+
let message: DemoMessage
313+
314+
var body: some View {
315+
VStack(alignment: .leading) {
316+
Text(message.title).font(.system(size: 20, weight: .bold))
317+
Text(message.body)
318+
319+
Button("Dismiss") {
320+
hide(animated: true) // Self-dismiss with animation
321+
}
322+
}
323+
.padding(30)
324+
.frame(maxWidth: .infinity)
325+
.background(.gray)
326+
}
327+
}
328+
````
329+
330+
You can also call the SwiftMessages APIs directly from within your SwiftUI views:
331+
332+
````swift
333+
Button("Hide Current") {
334+
SwiftMessages.hide()
335+
}
336+
````
337+
279338
Try it out in the SwiftUI demo app!
280339
281340
### Accessibility

SwiftMessages.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'SwiftMessages'
3-
spec.version = '10.0.1'
3+
spec.version = '10.0.2'
44
spec.license = { :type => 'MIT' }
55
spec.homepage = 'https://github.com/SwiftKickMobile/SwiftMessages'
66
spec.authors = { 'Timothy Moose' => '[email protected]' }

0 commit comments

Comments
 (0)