Releases: SwiftKickMobile/SwiftMessages
9.0.2
9.0.1
Fixes
- #455 #458 Restore key window after message is interacted with. When a message becomes the key window, such as if the user interacts with the message, iOS does not automatically restore the previous key window when the message is dismissed. SwiftMessages has some logic in
WindowViewController
to restore the key window. This change makes that logic more robust.
9.0.0
Features
- #447 Add the ability to show view controller in a new window with
SwiftMessagesSegue
.
This capability is available when usingSwiftMessagesSegue
programmatically by supplying
an instance ofWindowViewController
as the segue's source view controller.
Fixes
- #451 Fix app extension crash
Changes
- This release has minor breaking changes in the
WindowViewController
initializers.
ThewindowLevel
is no longer accepted as an argument because theconfig
parameter
should specify the window level in thepresentationContext
property.
8.0.5
8.0.4
SPM Support
SPM Partial Support for Xcode 11
Changes
- #395 Add preliminary support for Swift Package Manager.
Long overdue
Sorry for taking so long to release this.
Changes
- Add
SwiftMessages.PresentationContext.windowScene
option for targeting a specific window scene. - Changed the behavior of the default
presentationContext
,.automatic
. Previously, if the root view controller was presenting, the message would only be displayed over the presented view controller if themodalPresentationStyle
wasfullScreen
oroverFullScreen
. Now, messages are always displayed over presented view controllers. - Made
showDuraton
andhideDuration
onAnimator
non-optional. - Made
showDuraton
andhideDuration
writable options onTopBottomAnimation
andPhysicsAnimation
.
Fixes
- #365 Fix an issue with customized
TopBottomAnimation
where messages weren't properly displayed under navigation and tab bars. - #352 Fix accessibility for view controllers presented with
SwiftMessagesSegue
. - #355 Update card view layout to support centering of pure textual content
- #354 Support
overrideUserInterfaceStyle
when view presented in its own window - #360 Fix touch handing issue in iOS 13.1.3
- #382 Fix warnings in Xcode 11.4
iOS 13
No more warnings
Changes
- Swift 5
- Remove deprecated APIs
Features
- #313 Improved sizing on iPad
SwiftMessagesSegue
provides default view controller sizing based on device, with width on iPad being limited to 500pt max. However, it is recommended that you explicitly specify size appropriate for your content using one of the following methods.
- Define sufficient width and height constraints in your view controller such that it sizes itself.
- Set the
preferredContentSize
property (a.k.a "Use Preferred Explicit Size" in Interface Builder's attribute inspector). Zeros are ignored, e.g.CGSize(width: 0, height: 350)
only affects the height.- Add explicit width and/or height constraints to
segue.messageView.backgroundView
.Note that
Layout.topMessage
andLayout.bottomMessage
are always full screen width. For other layouts, the there is a maximum 500pt width on for regular horizontal size class (iPad) at 950 priority. This limit can be overridden by adding higher-priority constraints.
- #275 Add ability to avoid the keyboard.
The
KeyboardTrackingView
class can be used to cause the message view to avoid the keyboard by sliding up when the keyboard gets too close.// Message view var config = SwiftMessages.defaultConfig config.keyboardTrackingView = KeyboardTrackingView() // Or view controller segue.keyboardTrackingView = KeyboardTrackingView()You can incorporate
KeyboardTrackingView
into your app even when you're not using SwiftMessages. Install into your view hierarchy by pinningKeyboardTrackingView
to the bottom, leading, and trailing edges of the screen. Then pin the bottom of your content that should avoid the keyboard to the topKeyboardTrackingView
. Use an equality constraint to strictly track the keyboard or an inequality constraint to only move when the keyboard gets too close.KeyboardTrackingView
works by observing keyboard notifications and adjusting its height to maintain its top edge above the keyboard, thereby pushing your content up. See the comments inKeyboardTrackingView
for configuration options.