2

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

Saif
  • 2,278
  • 2
  • 18
  • 35

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
  • 8,792
  • 2
  • 38
  • 54