- #401 UIAlertController pops up but SwiftMessage layer absorbs all touches.
🚀 Sorry for taking so long to release this.
- ➕ Add
SwiftMessages.PresentationContext.windowSceneoption for targeting a specific window scene.
- 💅 Changed the behavior of the default
.automatic. Previously, if the root view controller was presenting, the message would only be displayed over the presented view controller if the
overFullScreen. Now, messages are always displayed over presented view controllers.
hideDurationwritable options on
- #365 Fix an issue with customized
TopBottomAnimationwhere messages weren't properly displayed under navigation and tab bars.
- #352 Fix accessibility for view controllers presented with
- ⚡️ #355 Update card view layout to support centering of pure textual content
- 💅 #354 Support
overrideUserInterfaceStylewhen view presented in its own window
- #360 Fix touch handing issue in iOS 13.1.3
- ⚠ #382 Fix warnings in Xcode 11.4
- ➕ Add
- Swift 5
- ✂ Remove deprecated APIs
- #313 Improved sizing on iPad
SwiftMessagesSegueprovides 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.
🏗 > 2. Set the
preferredContentSizeproperty (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
Layout.bottomMessageare 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.
KeyboardTrackingViewclass can be used to cause the message view to avoid the keyboard by sliding up when the keyboard gets too close.
0️⃣ > // Message viewvar config = SwiftMessages.defaultConfigconfig.keyboardTrackingView = KeyboardTrackingView()// Or view controllersegue.keyboardTrackingView = KeyboardTrackingView()
👀 > You can incorporate
KeyboardTrackingViewinto your app even when you're not using SwiftMessages. Install into your view hierarchy by pinning
KeyboardTrackingViewto the bottom, leading, and trailing edges of the screen. Then pin the bottom of your content that should avoid the keyboard to the top
KeyboardTrackingView. Use an equality constraint to strictly track the keyboard or an inequality constraint to only move when the keyboard gets too close.
KeyboardTrackingViewworks by observing keyboard notifications and adjusting its height to maintain its top edge above the keyboard, thereby pushing your content up. See the comments in
KeyboardTrackingViewfor configuration options.
- #262 Add event listeners to
- #262 Add event listeners to
- 💅 #257 The
.centeredpresentation style, which is a shortcut for a specific configuration of the
PhysicsAnimationanimator, provides a physics-based dismissal gesture where the view can be flung off screen. When the view goes out of the container view's bounds, the animator calls
SwiftMessages.hide(), which animates the dim view away and concludes the message view's lifecycle. There is currently a small delay of 0.2s before calling
🔧 This change adds the ability to configure the delay by customizing the animator. For example, to set the delay to zero, one would do:
let animation = PhysicsAnimation() animation.panHandler.hideDelay = 0 config.presentationStyle = .custom(animator: animation)
- 💅 #257 The
- Migrate to Swift 4.2
- 🛠 Fix #228 restore shared SwiftMessages scheme
- ✂ Remove debug code that broke the view controller's section of the Demo app.
💥 Breaking Changes
- ✂ Removed support for iOS 8.
- ➕ Add support for modal view controller presentation using
SwiftMessagesSeguecustom segue subclass. Try it out in the "View Controllers" section of the Demo app. In addition to the class documentation, more can be found in the View Controllers readme.
- ⚡️ Update nib files to be more visually consistent with iPhone X:
CornerRoundingView, which provides configurable corner rounding using squircles (the smoother method of rounding corners that you see on app icons). Nib files that feature rounded corners have their
backgroundViewassigned to a
roundsLeadingCornersoption to dynamically round only the leading corners of the view when presented from top or bottom (a feature used for the tab-style layouts).
- Increased the default corner radius to 20. Corner radius can be changed by either modifying the nib file or
- 🔧 Reworked the
MarginAdjustableto improve configurability of layout margins.
- ➕ Add rubber-banding to the interactive dismissal gesture. Rubber banding is automatically applied for views where
backgroundViewis inset from the message view's edges.
- ➕ Added
hideDurationproperties to the
Animatorprotocol (with default implementation that returns
nil). These values enable animations to work for view controller presentation.