2

Can any one please explain the difference between NSLayoutAttributeTopMargin and NSLayoutAttributeTop, I googled it but didn't find any clear solution.

Saif
  • 2,678
  • 2
  • 22
  • 38

1 Answers1

3

NSLayoutAttributeTop aligns to the top of the container. NSLayoutTopMargin aligns to the top margin of the container, which is 8 points below the top of the container by default on iOS8.

See this answer for a great description of margins: What is "Constrain to margin" in Storyboard in Xcode 6

Community
  • 1
  • 1
Mike Taverne
  • 9,156
  • 2
  • 42
  • 58