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

ANActivityIndicatorPresenter.hide() + 215 #2

Open
iossachin opened this issue Jan 5, 2022 · 2 comments
Open

ANActivityIndicatorPresenter.hide() + 215 #2

iossachin opened this issue Jan 5, 2022 · 2 comments

Comments

@iossachin
Copy link

iossachin commented Jan 5, 2022

Application crash on this function.

private func hide() {
        guard let keyWindow = UIApplication.shared.keyWindow else { return }
        
        for item in keyWindow.subviews
            where item.restorationIdentifier == restorationIdentifier {
                item.removeFromSuperview()
        }
        showTimer?.invalidate()
        showTimer = nil
    }
@anelad
Copy link
Owner

anelad commented Jan 5, 2022

Hey, since I've quit coding for a long while; the repo has not been updated. Can you give me more specific information about your debugging environment? For ex on which device and which verson of iOS? So while I have some free time I can update the repo.

@anelad
Copy link
Owner

anelad commented Jan 5, 2022

@iossachin It looks like the problem is in this line:

where item.restorationIdentifier == restorationIdentifier

where item.restorationIdentifier is an optional string; which means if it's nil the equation check will fail. Weird tho, Xcode doesn't complaining about it.

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

2 participants