Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 1.17 KB

File metadata and controls

32 lines (27 loc) · 1.17 KB

DynamicPopupView

Dynamic height pop view to accmodate lenghty content in a popup view for e.g Terms and Conditions with scroll support.

Alt text Alt text

Features

It automatically manages its height. Max height is the height of the device with 20 padding from top and bottom.
Aligns it self to centre of the screen.
Scoll view is added to support the lengthy content.
Customizable show and hide animation.

Installation:

pod 'DynamicPopupView'

Usage:

var dynamicPopUpVw = DynamicPopupVw()
dynamicPopUpVw?.delegate = self
dynamicPopUpVw?.showAnimationType = UIView.AnimationOptions.transitionCurlDown
dynamicPopUpVw?.hideAnimationType = UIView.AnimationOptions.transitionCurlUp
dynamicPopUpVw?.delayToAnimate = 1
dynamicPopUpVw?.titleLbl.text = "Terms and Conditions"
dynamicPopUpVw?.contentTxtVw.text = "Terms and Conditions"

Show

dynamicPopUpVw.show(view:self.view)

Hide

dynamicPopUpVw.hide()

Delegate

DynamicPopupVwProtocol
func termAccepted()

func termDeclined()