From b32c17119e5b046aab796a29e321759095a0959b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sat, 21 Jan 2017 18:22:19 -0800 Subject: [PATCH] [ios] EdgeInsets is UIEdgeInsets in Swift on iOS --- platform/darwin/docs/guides/For Style Authors.md.ejs | 12 +++++++++--- platform/ios/docs/guides/For Style Authors.md | 7 ++++--- platform/macos/docs/guides/For Style Authors.md | 7 ++++--- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs index d1cbfff4f51..ee13aa11303 100644 --- a/platform/darwin/docs/guides/For Style Authors.md.ejs +++ b/platform/darwin/docs/guides/For Style Authors.md.ejs @@ -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 diff --git a/platform/ios/docs/guides/For Style Authors.md b/platform/ios/docs/guides/For Style Authors.md index f487f7eb013..a8b6216ae9f 100644 --- a/platform/ios/docs/guides/For Style Authors.md +++ b/platform/ios/docs/guides/For Style Authors.md @@ -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 diff --git a/platform/macos/docs/guides/For Style Authors.md b/platform/macos/docs/guides/For Style Authors.md index 2e102f48ed7..5c9160580ac 100644 --- a/platform/macos/docs/guides/For Style Authors.md +++ b/platform/macos/docs/guides/For Style Authors.md @@ -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