Skip to content

Releases: SwiftKickMobile/SwiftMessages

3.5.0

06 Sep 14:27
Compare
Choose a tag to compare

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

Centered Messages

01 Jul 16:41
Compare
Choose a tag to compare
  • 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.

Add .blur Dim Mode

14 Jun 15:29
Compare
Choose a tag to compare
3.3.4

Store id on init to avoid non-main queue UIKit access

3.3.3: Merge pull request #79 from rockerhx/master

31 Mar 19:53
Compare
Choose a tag to compare

Voice Over Improvements

27 Mar 16:05
Compare
Choose a tag to compare

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.

Hot Fix

13 Mar 14:48
Compare
Choose a tag to compare

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

Voice Over

12 Mar 19:22
Compare
Choose a tag to compare

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.

Hot Fix

06 Mar 12:19
Compare
Choose a tag to compare

Bug Fixes

  • Fix infinite loop bug introduced in 3.2.0.

Indefinite Duration

05 Mar 18:01
Compare
Choose a tag to compare

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

3.1.4: Merge pull request #57 from ceyhuno/master

15 Jan 17:43
Compare
Choose a tag to compare
Dispatched Presenter.init(config:view:delegate:) call in SwiftMessages class to the main queue