[ios] EdgeInsets is UIEdgeInsets in Swift on iOS

This commit is contained in:
Minh Nguyễn
2017-01-21 18:22:19 -08:00
parent 5a2bb8d240
commit b32c17119e
3 changed files with 17 additions and 9 deletions

View File

@@ -282,9 +282,15 @@ Array (`-padding`) | `NSValue.edgeInsetsValue` | `NSValue.edgeInsetsValue`
<% } -%>
For padding attributes, note that the arguments to
`<%- cocoaPrefix %>EdgeInsetsMake()` in Objective-C and
`EdgeInsets(top:left:bottom:right:)` in Swift are specified in counterclockwise
order, in contrast to the clockwise order defined by the style specification.
<% if (iOS) { -%>
`UIEdgeInsetsMake()` in Objective-C and `UIEdgeInsets(top:left:bottom:right:)`
in Swift
<% } else { -%>
`NSEdgeInsetsMake()` in Objective-C and `EdgeInsets(top:left:bottom:right:)` in
Swift
<% } -%>
are specified in counterclockwise order, in contrast to the clockwise order
defined by the style specification.
<% if (macOS) { -%>
Additionally, on macOS, a screen coordinate of (0, 0) is located at the

View File

@@ -275,9 +275,10 @@ Array (`-offset`, `-translate`) | `NSValue.CGVectorValue` | `NSValue.cgVectorVal
Array (`-padding`) | `NSValue.UIEdgeInsetsValue` | `NSValue.uiEdgeInsetsValue`
For padding attributes, note that the arguments to
`UIEdgeInsetsMake()` in Objective-C and
`EdgeInsets(top:left:bottom:right:)` in Swift are specified in counterclockwise
order, in contrast to the clockwise order defined by the style specification.
`UIEdgeInsetsMake()` in Objective-C and `UIEdgeInsets(top:left:bottom:right:)`
in Swift
are specified in counterclockwise order, in contrast to the clockwise order
defined by the style specification.
## Filtering sources

View File

@@ -263,9 +263,10 @@ Array (`-offset`, `-translate`) | `NSValue` containing `CGVector` | `NSValue` co
Array (`-padding`) | `NSValue.edgeInsetsValue` | `NSValue.edgeInsetsValue`
For padding attributes, note that the arguments to
`NSEdgeInsetsMake()` in Objective-C and
`EdgeInsets(top:left:bottom:right:)` in Swift are specified in counterclockwise
order, in contrast to the clockwise order defined by the style specification.
`NSEdgeInsetsMake()` in Objective-C and `EdgeInsets(top:left:bottom:right:)` in
Swift
are specified in counterclockwise order, in contrast to the clockwise order
defined by the style specification.
Additionally, on macOS, a screen coordinate of (0, 0) is located at the
lower-left corner of the screen. Therefore, a positive `CGVector.dy` means an