Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[ios] EdgeInsets is UIEdgeInsets in Swift on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Jan 23, 2017
1 parent 5a2bb8d commit b32c171
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
12 changes: 9 additions & 3 deletions platform/darwin/docs/guides/For Style Authors.md.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions platform/ios/docs/guides/For Style Authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions platform/macos/docs/guides/For Style Authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b32c171

Please sign in to comment.