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: [ios, macos] Clarified CGVector, NS/UIEdgeInsets accessors --- platform/darwin/docs/guides/For Style Authors.md.ejs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'platform/darwin/docs/guides/For Style Authors.md.ejs') diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs index 4ead778c03..c1e2a18d84 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 -- cgit v1.2.1