Search code examples
iosuiviewcontrollerautolayoutstoryboardnslayoutconstraint

Constrains causing black spots on display


I am pretty new to styling/Constraints/Auto-Layout in iOS. I am having a problem that when I apply constrains to one of my ViewControllers I get black "bars" around the edges.

Here is what it looks like in the story board:

enter image description here

Here is what it looks like on the phone:


enter image description here

Question

How do I fix this?

Edit

I know this is an issue with constrains because when I don't use constraints it works perfectly fine.


Solution

  • Remove [self.view setTranslatesAutoresizingMaskIntoConstraints:NO] in your DateModificationViewController