From 1ae84db9789e638aaec0cd13c6921eb8a3503641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Sun, 8 Jan 2017 16:35:51 -0800 Subject: [PATCH] [ios, macos] Clarified CGVector, NS/UIEdgeInsets accessors --- 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 4ead778c0..c1e2a18d8 100644 --- a/platform/darwin/docs/guides/For Style Authors.md.ejs +++ b/platform/darwin/docs/guides/For Style Authors.md.ejs @@ -261,7 +261,8 @@ you want the attribute to be set to. In contrast to the JSON type that the style specification defines for each layout or paint property, the style value object often contains a more specific Foundation or Cocoa type. General rules for attribute types are listed below. -Pay close attention to the SDK documentation for the attribute you want to set. +Pay close attention to the SDK documentation for the attribute you want to get +or set. In style JSON | In Objective-C | In Swift --------------|-----------------------|--------- @@ -272,8 +273,13 @@ Boolean | `NSNumber.boolValue` | `NSNumber.boolValue` Number | `NSNumber.floatValue` | `NSNumber.floatValue` Array (`-dasharray`) | `NSArray` | `[NSNumber]` Array (`-font`) | `NSArray` | `[String]` -Array (`-offset`, `-translate`) | `CGVector` | `CGVector` -Array (`-padding`) | `<%- cocoaPrefix %>EdgeInsets` | `<%- cocoaPrefix %>EdgeInsets` +<% if (iOS) { -%> +Array (`-offset`, `-translate`) | `NSValue.CGVectorValue` | `NSValue.cgVectorValue` +Array (`-padding`) | `NSValue.UIEdgeInsetsValue` | `NSValue.uiEdgeInsetsValue` +<% } else { -%> +Array (`-offset`, `-translate`) | `NSValue` containing `CGVector` | `NSValue` containing `CGVector` +Array (`-padding`) | `NSValue.edgeInsetsValue` | `NSValue.edgeInsetsValue` +<% } -%> ## Filtering sources diff --git a/platform/ios/docs/guides/For Style Authors.md b/platform/ios/docs/guides/For Style Authors.md index 8b6d153b5..919b9bde7 100644 --- a/platform/ios/docs/guides/For Style Authors.md +++ b/platform/ios/docs/guides/For Style Authors.md @@ -259,7 +259,8 @@ you want the attribute to be set to. In contrast to the JSON type that the style specification defines for each layout or paint property, the style value object often contains a more specific Foundation or Cocoa type. General rules for attribute types are listed below. -Pay close attention to the SDK documentation for the attribute you want to set. +Pay close attention to the SDK documentation for the attribute you want to get +or set. In style JSON | In Objective-C | In Swift --------------|-----------------------|--------- @@ -270,8 +271,8 @@ Boolean | `NSNumber.boolValue` | `NSNumber.boolValue` Number | `NSNumber.floatValue` | `NSNumber.floatValue` Array (`-dasharray`) | `NSArray` | `[NSNumber]` Array (`-font`) | `NSArray` | `[String]` -Array (`-offset`, `-translate`) | `CGVector` | `CGVector` -Array (`-padding`) | `UIEdgeInsets` | `UIEdgeInsets` +Array (`-offset`, `-translate`) | `NSValue.CGVectorValue` | `NSValue.cgVectorValue` +Array (`-padding`) | `NSValue.UIEdgeInsetsValue` | `NSValue.uiEdgeInsetsValue` ## Filtering sources diff --git a/platform/macos/docs/guides/For Style Authors.md b/platform/macos/docs/guides/For Style Authors.md index 5f11c1759..a4fd7ee9c 100644 --- a/platform/macos/docs/guides/For Style Authors.md +++ b/platform/macos/docs/guides/For Style Authors.md @@ -247,7 +247,8 @@ you want the attribute to be set to. In contrast to the JSON type that the style specification defines for each layout or paint property, the style value object often contains a more specific Foundation or Cocoa type. General rules for attribute types are listed below. -Pay close attention to the SDK documentation for the attribute you want to set. +Pay close attention to the SDK documentation for the attribute you want to get +or set. In style JSON | In Objective-C | In Swift --------------|-----------------------|--------- @@ -258,8 +259,8 @@ Boolean | `NSNumber.boolValue` | `NSNumber.boolValue` Number | `NSNumber.floatValue` | `NSNumber.floatValue` Array (`-dasharray`) | `NSArray` | `[NSNumber]` Array (`-font`) | `NSArray` | `[String]` -Array (`-offset`, `-translate`) | `CGVector` | `CGVector` -Array (`-padding`) | `NSEdgeInsets` | `NSEdgeInsets` +Array (`-offset`, `-translate`) | `NSValue` containing `CGVector` | `NSValue` containing `CGVector` +Array (`-padding`) | `NSValue.edgeInsetsValue` | `NSValue.edgeInsetsValue` ## Filtering sources