MimiBulletinController

public final class MimiBulletinController

Controller which can present and dismiss bulletins, views that appear as modal cards.

  • Show a bulletin.

    Declaration

    Swift

    @discardableResult
    public func show(_ item: MimiBulletinItem,
                     animated: Bool = true,
                     completion: (() -> Void)? = nil) -> Bool
    Parameters
    item

    Item to show.

    animated

    Whether to animate showing the bulletin.

    completion

    Completion of showing.

    Return Value

    Whether the bulletin was shown.

  • Queue a bulletin to show after the current bulletin is dismissed.

    Declaration

    Swift

    public func enqueue(_ item: MimiBulletinItem,
                        sort: ((MimiBulletinItem, MimiBulletinItem) -> Bool)? = nil)
    Parameters
    item

    Item to queue.

  • Dequeue a bulletin from the pending queue.

    Declaration

    Swift

    @discardableResult
    public func dequeue(_ item: MimiBulletinItem,
                        sort: ((MimiBulletinItem, MimiBulletinItem) -> Bool)? = nil) -> MimiBulletinItem?
    Parameters
    item

    Bulletin to dequeue.

    sort

    Sorting to apply after dequeueing.

    Return Value

    Bulletin if dequeued.

  • Dismiss the current bulletin.

    If there are queued bulletins, they will be shown instead of dismissing the bulletin.

    Declaration

    Swift

    public func dismiss(animated: Bool = true,
                        completion: (() -> Void)? = nil)
    Parameters
    animated

    Whether to animate dismissal.

    completion

    Completion of dismissal.

  • Invalidate the intrinsic presentation size of a bulletin.

    This might cause the presentation of the bulletin to change if its intrinsicContentSize has changed.

    Declaration

    Swift

    public func invalidateIntrinsicSize(for bulletin: MimiBulletinItem)
    Parameters
    bulletin

    Bulletin to invalidate.