From 0150bc76eb8d2baa84ba040aead8131228c1185e Mon Sep 17 00:00:00 2001 From: Mohammed Date: Wed, 8 Mar 2017 06:41:17 -0800 Subject: [PATCH] Updating the documentation for getSize() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Clearly state that the `getSize()` does not work for static image resources because it is assumed the developer knows their static image resource size (the reason I got from a comment on a github issue by a react native contributor). This missing documentation cost me about 30 minutes to figure out why it didn't work for my static image resource and so I decided to update the documentation 💃 Closes https://github.com/facebook/react-native/pull/11645 Differential Revision: D4533463 Pulled By: lacker fbshipit-source-id: 70e175ea30a5540c8a9f2a0c040585c711d82ac3 --- Libraries/Image/Image.ios.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/Image/Image.ios.js b/Libraries/Image/Image.ios.js index 94b2766c545..3177b1f5e2f 100644 --- a/Libraries/Image/Image.ios.js +++ b/Libraries/Image/Image.ios.js @@ -289,6 +289,8 @@ const Image = React.createClass({ * does not fully load/download the image data. A proper, supported way to * preload images will be provided as a separate API. * + * Does not work for static image resources. + * * @param uri The location of the image. * @param success The function that will be called if the image was successfully found and width * and height retrieved.