We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ERROR:
"Because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies?"
Change the topView to a dynamic one. When user uses showProgressView function he has to pass by self.view
showProgressView
self.view
`open func showProgressView(_ ancestorView: UIView) { //This is making an error //guard let topView = UIApplication.shared.keyWindow?.rootViewController?.view else { //return //} containerView.backgroundColor = self.backgroundColor progressView.backgroundColor = self.forgroundColor activityIndicator.style = self.activityStyle UIApplication.shared.keyWindow?.addSubview(containerView) progressView.addSubview(activityIndicator) containerView.addSubview(progressView) activeConstraints = [ containerView.heightAnchor.constraint(equalTo: ancestorView.heightAnchor), containerView.widthAnchor.constraint(equalTo: ancestorView.widthAnchor), containerView.leadingAnchor.constraint(equalTo: ancestorView.leadingAnchor), containerView.topAnchor.constraint(equalTo: ancestorView.topAnchor), progressView.heightAnchor.constraint(equalToConstant: self.size.height), progressView.widthAnchor.constraint(equalToConstant: self.size.width), progressView.centerYAnchor.constraint(equalTo: containerView.centerYAnchor), progressView.centerXAnchor.constraint(equalTo: containerView.centerXAnchor), activityIndicator.heightAnchor.constraint(equalToConstant: self.size.height), activityIndicator.widthAnchor.constraint(equalToConstant: self.size.width), activityIndicator.centerYAnchor.constraint(equalTo: progressView.centerYAnchor), activityIndicator.centerXAnchor.constraint(equalTo: progressView.centerXAnchor) ] for constraint in activeConstraints { constraint.isActive = true } activityIndicator.startAnimating() }
`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ERROR:
Change the topView to a dynamic one. When user uses
showProgressView
function he has to pass byself.view
`
The text was updated successfully, but these errors were encountered: