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

Unable to simultaneously satisfy constraints ranomly #72

Open
Ewg777 opened this issue Apr 15, 2016 · 0 comments
Open

Unable to simultaneously satisfy constraints ranomly #72

Ewg777 opened this issue Apr 15, 2016 · 0 comments

Comments

@Ewg777
Copy link

Ewg777 commented Apr 15, 2016

CSNotificationView disappears randomly

 Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
        (1) look at each constraint and try to figure out which you don't expect; 
        (2) find the code that added the unwanted constraint or constraints and fix it. 
    (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x1f524250 h=-&- v=--& CSNotificationView:0x141d72c0.width == UIView:0x15944d40.width - 320>",
    "<NSLayoutConstraint:0x1f524550 H:|-(4)-[UIActivityIndicatorView:0x1d836340]   (Names: '|':CSNotificationView:0x141d72c0 )>",
    "<NSLayoutConstraint:0x1f524510 H:[UIActivityIndicatorView:0x1d836340(44)]>",
    "<NSLayoutConstraint:0x1f5244d0 H:[UIActivityIndicatorView:0x1d836340]-(5)-[UILabel:0x1d8364c0'Establishing...']>",
    "<NSLayoutConstraint:0x1f524490 H:[UILabel:0x1d8364c0'Establishing...']-(10)-|   (Names: '|':CSNotificationView:0x141d72c0 )>",
    "<NSLayoutConstraint:0x1f524150 'UIView-Encapsulated-Layout-Width' H:[UIView:0x15944d40(320)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x1f5244d0 H:[UIActivityIndicatorView:0x1d836340]-(5)-[UILabel:0x1d8364c0'Establishing ...']>

Sample:

      let loader = CSNotificationView(parentViewController: self,
                                  tintColor: UIColor(red: 0, green: 0, blue: 0, alpha: 0.1),
                                  image: nil,
                                  message: message)
      loader.showingActivity = true
      loader.setVisible(true, animated: true, completion: nil)
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