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

AlertView (Instance) + RxSwift #4

Open
hogumachu opened this issue Dec 5, 2021 · 1 comment
Open

AlertView (Instance) + RxSwift #4

hogumachu opened this issue Dec 5, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@hogumachu
Copy link
Owner

AlertView 가 deinit 되고 난 후 TestViewModel 에 있는 next method 가 호출 될 수 있도록 하기

TestViewModel 에 있는 testResultAlert method 에서 next method 를 호출하면
Reentrancy anomaly was detected 라고 나옴 (RxSwift 에러 같음)

@hogumachu hogumachu added the bug Something isn't working label Dec 5, 2021
@hogumachu
Copy link
Owner Author

 func testResultAlert(testReuslt: TestResult) {
    switch testReuslt {
    case .normal:
        return
    case .right:
        AlertView.showCheckMark("정답입니다")
    case .wrong:
        AlertView.showXMark("오답입니다")
    }
    
// 아마 testResultAlert 가 끝나고 next가 호출되야 되는데 AlertView 가 present 된 상태에서 호출되니까 그런거 같음
    next()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant