Skip to content

Presentation

Yegor Miroshnichenko edited this page Jul 7, 2018 · 3 revisions

NOTE

To present alert with default settings use showInKeyWindow() method.

Available presentation parameters

You can set any of the given parameter, not provided parameters will have default values.

Presenter

View to present alert in.

Default value is UIApplication.shared.keyWindow.

Vertical position

Position in presenter, top, center or bottom.

Default value is center.

Offset

Offset from vertical position in view.

Default value is 0.

Multiple presentations behavior

How alert should behave when another one already presented.

Default value is dismissCurrentlyPresented.

Showing duration

How long alert should be presented.

Default value is 2.

NOTE

This time should include fade animation duration (which is UINavigationControllerHideShowBarDuration).

Clone this wiki locally