SwiftMessages

A very flexible message bar for UIKit and SwiftUI.

MIT License

Stars
7.3K
Committers
36

Bot releases are visible (Hide)

SwiftMessages -

Published by wtmoose almost 6 years ago

SwiftMessages - Swift 4.2

Published by wtmoose about 6 years ago

SwiftMessages - Fix Demo app

Published by wtmoose about 6 years ago

Fixes

  • Remove debug code that broke the view controller's section of the Demo app.
SwiftMessages - View Controllers

Published by wtmoose about 6 years ago

Breaking Changes

  • Removed support for iOS 8.

Features

  • Add support for modal view controller presentation using SwiftMessagesSegue custom 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:
    • Introduce 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 backgroundView assigned to a CornerRoundingView. CornerRoundingView provides a roundsLeadingCorners option 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 MarginAdjustable to improve configurability of layout margins.
  • Add rubber-banding to the interactive dismissal gesture. Rubber banding is automatically applied for views where backgroundView is inset from the message view's edges.
  • Added showDuration and hideDuration properties to the Animator protocol (with default implementation that returns nil). These values enable animations to work for view controller presentation.

Fixes

  • #202 bodyLabel should set textAlignment to .natural
  • #200 Automatic Presentation Context Broken
  • Fix default value of TopBottomAnimation.closePercentThreshold
SwiftMessages - Whoops

Published by wtmoose over 6 years ago

Bug Fixes

  • Fix #191 Prevent usage of UIApplication.shared when building for extensions

Improvements

  • #192 Add a way to test compilation with app extension
SwiftMessages - Support Extensions

Published by wtmoose over 6 years ago

Features

  • #183 Added iOS app extension support at compile time.

Bug Fixes

  • Fix #185 Incorrect margin adjustments in landscape
  • Fix #188 Physics animation visual glitch
SwiftMessages - Swift 4.1

Published by wtmoose over 6 years ago

4.1.2

Features

  • Updates for Swift 4.1
  • #164 Added an optional windowViewController property to SwiftMessages.Config for supplying a custom subclass of WindowViewController.

Bug Fixes

  • Custom presentation styles using TopBottomAnimation now display properly under top and bottom bars.
SwiftMessages -

Published by wtmoose almost 7 years ago

Features

  • Fix #134 add support for CenterAnimation displayed on top or bottom instead of center (renamed to PhysicsAnimation).

Fixes

  • Fix #128 move icons out of asset catalog to prevent mysterious crash
  • Fix #129 adjust layout margins on orientation change to preserve layout when iOS hides status bar in landscape.
  • Fix #131 by always completing hide/show animations if application isn't active.
SwiftMessages - iOS 11 and iPhone X

Published by wtmoose about 7 years ago

Features

  • Swift 4.0 syntax

  • Added support for iOS 11 and iPhone X. From the readme:

    SwiftMessages 4 supports iOS 11 out-of-the-box with built-in support for safe areas. To ensur that message view layouts look just right when overlapping safe areas, views that adopt the MarginAdjustable protocol (like MessageView) will have their layout margins automatically adjusted by SwiftMessages. However, there is no one-size-fits-all adjustment, so the following properties were added to MarginAdjustable to allow for additional adjustments to be made to the layout margins:

    public protocol MarginAdjustable {
        ...
        /// Safe area top adjustment in iOS 11+
        var safeAreaTopOffset: CGFloat { get set }
        /// Safe area bottom adjustment in iOS 11+
        var safeAreaBottomOffset: CGFloat { get set }
    }
    

    If you're using using custom nib files or view classes and your layouts don't look quite right, try adjusting the values of these properties. BaseView (the super class of MessageView) declares these properties to be @IBDesignable and you can find sample values in the nib files included with SwiftMessages.

Bug Fixes

  • Fix #100 memory leak.
  • Change Layout enum capitalization to current Swift conventions.
SwiftMessages -

Published by wtmoose about 7 years ago

Bug Fixes

  • Undo change that broke MessageView class reference on nib files copied out of the SwiftMessages framework.
SwiftMessages - 3.5.0

Published by wtmoose about 7 years ago

Features

  • Added SwiftMessages.hideCounted(id:) method of hiding. The counted method hides when the number of calls to show() and hideCounted(id:) for a
    given message ID are equal. This can be useful for messages that may be
    shown from multiple code paths to ensure that all paths are ready to hide.

    Also added SwiftMessages.count(id:) to get the current count and SwiftMessages.set(id:count:) to set the current count.

  • Added ways to retrieve message views currently being shown, hidden, or queued to be shown.

    // Get a message view with the given ID if it is currently 
    // being shown or hidden.
    if let view = SwiftMessages.current(id: "some id") { ... }
    
    // Get a message view with the given ID if is it currently 
    // queued to be shown. 
    if let view = SwiftMessages.queued(id: "some id") { ... }
    
    // Get a message view with the given ID if it is currently being
    // shown, hidden or in the queue to be shown.
    if let view = SwiftMessages.currentOrQueued(id: "some id") { ... }
    

Bug Fixes

  • Fix #116 for message views that don't adopt the Identifiable protocol by using the memory address as the ID.
  • Fix #113 MessageView not hiding
  • Fix #87 Support manual install
SwiftMessages - Centered Messages

Published by wtmoose over 7 years ago

  • Added .center presentation style with a physics-based dismissal gesture.
  • Added .custom(animator:) presentation style, where you provide an instance of the Animator protocol. The TopBottomAnimation and CenterAnimation animations both implement Animator and may be subclassed (configuration options will be added in a future release). You may use the PhysicsPanHandler class to incorporate a physics-based dismissal gesture into any custom animator.
  • Added .centered message view layout with elements centered and arranged vertically.
  • Added configureBackgroundView(width:) and configureBackgroundView(sideMargin:) convenience methods to MessageView.
SwiftMessages - Add .blur Dim Mode

Published by wtmoose over 7 years ago

SwiftMessages -

Published by wtmoose over 7 years ago

SwiftMessages - Voice Over Improvements

Published by wtmoose over 7 years ago

Improvements

  • MessageView is smarter about including additional accessibility views for cases where you've added accessible elements to the view. Previously only the button was included. Now all views where isAccessibilityElement == true are included.

    Note that all nib files now have isAccessibilityElement == false for titleLabel, bodyLabel and iconLabel (titleLabel and bodyLabel are read out as part of the overall message view's text). If any of these need to be directly accessible, then copy the nib file into your project and select "Enabled" in the Accessibility section of the Identity Inspector.

SwiftMessages - Hot Fix

Published by wtmoose over 7 years ago

Fix regression where the UI was being blocked when using DimMode.none.

SwiftMessages - Voice Over

Published by wtmoose over 7 years ago

From the README:

SwiftMessages provides excellent VoiceOver support out-of-the-box.

  • The title and body of the message are combined into a single announcement when the message is shown. The MessageView.accessibilityPrefix property can be set to prepend additional clarifying text to the announcement.

    Sometimes, a message may contain important visual cues that aren't captured in the title or body. For example, a message may rely on a yellow background to convey a warning rather than having the word "warning" in the title or body. In this case, it might be helpful to set MessageView.accessibilityPrefix = "warning".

  • If the message is shown with a dim view using config.dimMode, elements below the dim view are not focusable until the message is hidden. If config.dimMode.interactive == true, the dim view itself will be focusable and read out "dismiss" followed by "button". The former text can be customized by setting the config.dimModeAccessibilityLabel property.

See the AccessibleMessage protocol for implementing proper accessibility support in custom views.

SwiftMessages - Hot Fix

Published by wtmoose over 7 years ago

Bug Fixes

  • Fix infinite loop bug introduced in 3.2.0.
SwiftMessages - Indefinite Duration

Published by wtmoose over 7 years ago

Features

  • Added the ability to display messages for an indefinite duration while enforcing a minimum duration using Duration.indefinite(delay:minimum).

    This option is useful for displaying a message when a process is taking too long but you don't want to display the message if the process completes in a reasonable amount of time.

    For example, if a URL load is expected to complete in 2 seconds, you may use the value unknown(delay: 2, minimum 1) to ensure that the message will not be displayed most of the time, but will be displayed for at least 1 second if the operation takes longer than 2 seconds. By specifying a minimum duration, you can avoid hiding the message too fast if the operation finishes right after the delay interval.

Bug Fixes

  • Prevent views below the dim view from receiving accessibility focus.
  • Prevent taps in the message view from hiding when using interactive dim mode.
  • Fix memory leak of single message view
SwiftMessages -

Published by wtmoose almost 8 years ago

Package Rankings
Top 6.04% on Carthage
Top 2.27% on Swiftpackageindex.com
Top 0.29% on Cocoapods.org
Badges
Extracted from project README
Twitter: @TimothyMoose Version License Platform Carthage compatible