Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议popupView的回调中返回popupView的对象 #1198

Open
po1xiao opened this issue Jan 11, 2024 · 0 comments
Open

建议popupView的回调中返回popupView的对象 #1198

po1xiao opened this issue Jan 11, 2024 · 0 comments

Comments

@po1xiao
Copy link

po1xiao commented Jan 11, 2024

XPopup版本
如2.9.19

手机系统和型号
机型不影响

描述你的问题
可以popupView的回调中返回popupView的对象,方便在回调中对Popup做一些操作,下方举个具体的例子

var basePopupWindow:BasePopupView? = null
popupWindow = XPopup.Builder(this)
    .isDarkTheme(AppConfig.isDarkTheme())
    .customAnimator(IOSStyleDialogAnimator())
    .autoDismiss(false) //设置不默认取消
    .asConfirm("提示", "我是内容", "取消", "确认", {
	//点击确认需要dismiss,这是必须要创建用popupWindow接收对象才行,如果回调中返回该对象,就不会需要有这一步,增加便捷性
		popupWindow?.dismiss()
    }, {
     	//点击取消
    }, false).show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant