3

I am getting the following errors:

enter image description here

But i am unable to find the view which occurs that warnings. When ill delete all views in the Storyboard, and perform a "Clean" - the warnings are still present.

Any ideas how to find that view?

derdida
  • 14,784
  • 16
  • 90
  • 139

2 Answers2

5

Any ideas how to find that view?

It's not a "view"; it's the storyboard itself. Edit the storyboard and check Use Safe Area Layout Guides:

enter image description here

Also you might need to quit Xcode and clean out the DerivedData folder so as to get a completely clean build.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • Thanks - ive already used that checkbox before (but nothing changes after cleaning) - but now WITH CLOSING xCode AND cleaning again, the warnings disappear. – derdida Jan 24 '18 at 22:25
-1
let guide = view.safeAreaLayoutGuide

//put the code like this
view.topAnchor.constraint(equalTo: guide.topAnchor).isActive = true
Muhammad Ahmad
  • 388
  • 4
  • 9