I am simply using
toolBar.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 0).isActive = true
for setting up my topAnchor.
However, when I change the constant from 0 to an actual number, the console gives me
[LayoutConstraints] Unable to simultaneously satisfy constraints.
this error.
I am calling this constraint in viewDidLoad but changing it to viewWillLayoutSubviews or other parts do not solve the problem.
How do I fix this error? Thank you!