美文网首页
iOS swift 利用KLCPopup实现底部弹出菜单

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

作者: 鹅鹅鹅_ | 来源:发表于2019-03-06 21:21 被阅读0次

想要了解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实现底部弹出菜单

      本文链接:https://www.haomeiwen.com/subject/khkfpqtx.html