Everything used to work great until yesterday I updated Xcode to version 8.
If I don't use any constraints, I can see the buttons but when I apply constraint(s) to the buttons they disappear, no matter what or how many constraints (height, vertical spacing, trailing etc...) I apply.
When I tap buttons, they act normal (events are always sent so I assume they are actually located there(?)). I tried changing text color, background color, (even adding a new UIButton) but ended with no luck. I can't see the buttons. When I change the background color of Centered View
I can see this change on the app. The weirdest part is when I click Debug View Hierarchy
on Xcode to see what is going on, everything looks fine there; I can see all buttons located as I expect.
Testing the app both on iPhone 5 (iOS 9.3.5) and iPhone 6 (iOS 10).
I am using Swift 2.3, iOS 10 and Xcode 8.
Is this a bug on Xcode 8? How to resolve this issue?
UPDATE:
I just realised same constraint problem occurs on UILabel and UIImageView too. They look fine without constraint but when I add any constraint they disappear.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…