想要了解KLCPopup請(qǐng)點(diǎn)擊 -> KLCPopup
實(shí)現(xiàn)底部彈出菜單主要是如下代碼伶氢,定義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))
}
效果圖