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

Swift如何使用? 为何无法显示? #102

Open
lixiang1994 opened this issue Apr 27, 2020 · 5 comments
Open

Swift如何使用? 为何无法显示? #102

lixiang1994 opened this issue Apr 27, 2020 · 5 comments
Labels
Q&A 常见问题

Comments

@lixiang1994
Copy link
Owner

let alert = LEEAlert.alert()
let config = alert.config
config.xxxxx()
config.xxxxx()

具体原因可以参考: #40

@jasonbehr
Copy link

@lixiang1994 遇到同样的问题,拆开写 weakSelf不为nil任然无法显示弹框,有在appdelegate配置configMainWindow

@lixiang1994
Copy link
Owner Author

@jasonbehr 代码发一下

@jasonbehr
Copy link

@lixiang1994
@objc func showAlert(sender: UIButton) {

    let alert = LEEAlert.alert()
    _ = alert.config
    .leeTitle("标题")
    .leeContent("内容")
    .leeAction("确认", {
        print("点击取消")
    })
    .leeShow()
    
}

@lixiang1994
Copy link
Owner Author

你重新下载一下master分支 我加了一个SwiftDemo 运行你的代码没发现什么问题, 你看看?

@jasonbehr
Copy link

@lixiang1994 可以了,是我自己在appdelegate 设置了主窗口,SceneDelegate忘记删除了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Q&A 常见问题
Projects
None yet
Development

No branches or pull requests

2 participants