CallBannerController

@objc(BDKCallBannerController)
public class CallBannerController : NSObject

A controller managing the “return to call” bar user interface. Once started, this controller will observe for any ongoing call and it wil show the “return to call” bar at the top of the screen when at least one call is being performed. It will also hide the presented “return to call” bar when all calls have finished.

Remark

In order for this controller to work properly, you must provide a UIViewController instance that will be used to host the “return to call” bar. Failing to do so will result in a fatalError crashing your app.
  • The controller’s delegate.

    Declaration

    Swift

    @objc
    public weak var delegate: CallBannerControllerDelegate
  • The view controller hosting the CallBannerView

    Remark

    You are required to provide a view controller instance before the show method is invoked, otherwise the banner won’t show up when a call is being performed.

    Declaration

    Swift

    @objc
    public weak var parentViewController: UIViewController

Initialization

  • Initialize a CallBannerController instance.

    Declaration

    Swift

    public override convenience init()

Show/Hide

  • Starts observing for any ongoing call an when it detects there’s at least one call in progress shows the “return to call” bar at the top of the screen embedding the CallBannerView in the host view controller you provided in this instance parentViewController property. When all ongoing call have finished or when there aren’t any the “return to call” bar will be hidden automatically.

    Declaration

    Swift

    @objc
    public func show()
  • Stops observing for any ongoing call hiding the “return to call” bar at the top of the screen if it is shown. Beware after calling this method, any call being performed won’t trigger the “return to call” bar. You should call this method only when you are about to dismiss the view controller designated to host the “return to call” bar.

    Declaration

    Swift

    @objc
    public func hide()

Size transition

  • You should call this method to notify the controller about size changes of the host controller’s view. This is method is analogous to UIViewController‘s viewWillTransition(to:coordinator:) method.

    Declaration

    Swift

    @objc
    public func viewWillTransition(to size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator)

    Parameters

    size

    The new size for the container’s view.

    coordinator

    The transition coordinator object managing the size change.