Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 3.08 KB

readme.md

File metadata and controls

58 lines (44 loc) · 3.08 KB

Here is an image editor for react native.

###Demos: Scale:

enter image description here

Press Option key, then move finger on touchpad:

enter image description here

Drawing on image, only move finger on touchpad (don't need to press Option key): enter image description here

###Development steps:

$ git clone https://github.com/lifuzu/react-native-image-editor.git
$ cd react-native-image-editor/
$ npm install
$ npm link
$ cd Examples/ReactNativeImageEditor/
$ npm install
$ npm link react-native-image-editor

Then open the project ReactNativeImageEditor.xcodeproj under the folder: ReactNativeImageEditor.xcodeproj/Examples/ReactNativeImageEditor/ enter image description here

When you run the project, sometimes you get a red screen on iOS simulator, like: enter image description here

Which should mean your node server console does not yet ready for the development server, like this one: enter image description here

You have to wait for next printouts, like the following:

[11:46:54 PM] <START> fs crawl
[11:47:32 PM] <END>   fs crawl (37615ms)
[11:47:32 PM] <START> Building in-memory fs
[11:48:26 PM] <END>   Building in-memory fs (54233ms)
[11:48:26 PM] <START> Building in-memory fs
[11:49:20 PM] <END>   Building in-memory fs (54080ms)
[11:49:20 PM] <START> Building Haste Map
[11:49:43 PM] <START> Building (deprecated) Asset Map
[11:49:53 PM] <END>   Building (deprecated) Asset Map (10343ms)
[11:49:57 PM] <END>   Building Haste Map (36723ms)

Then click 'Reload JS' in the bottom-right corner of the red screen or press Command + R key. Since we have to uninstall watchman, a little bit longer time need to be waited.

NOTE: Uninstall watchman to workaround the bug of that, the latest version of react native does NOT support symbolic for node modules, which we are using in this project, until we publish the module onto https://www.npmjs.com/package;

NOTE: Don't use iojs, use nodejs (it is better to keep v0.12.2). iojs open a lot of files, caused the following error:

Error: EMFILE: too many open files

NOTE: You probably need to enlarge max open files on mac, please refer to this issue: gruntjs/grunt-contrib-copy#21