iOS swift 利用KLCPopup实现底部弹出菜单

想要了解KLCPopup请点击 -> KLCPopup

实现底部弹出菜单主要是如下代码,定义KLCPopup从底部弹出view,并且layout布局在底部

func showPopupFromBottom(contentView:UIView) {
    let popupView = KLCPopup(contentView: contentView, showType: KLCPopupShowType.slideInFromBottom, dismissType: KLCPopupDismissType.slideOutToBottom, maskType: KLCPopupMaskType.dimmed, dismissOnBackgroundTouch: true, dismissOnContentTouch: false)
    popupView?.show(with: KLCPopupLayout.init(horizontal: KLCPopupHorizontalLayout.center, vertical: KLCPopupVerticalLayout.bottom))
}

效果图

你可能感兴趣的:(iOS swift 利用KLCPopup实现底部弹出菜单)