Janic Duplessis f0a3c56048 Add TextInput controlled selection prop on iOS
Summary:
This adds support for a controlled `selection` prop on `TextInput` on iOS (Android PR coming soon). This is based on the work by ehd in #2668 which hasn't been updated for a while, kept the original commit and worked on fixing what was missing based on the feedback in the original PR.

What I changed is:
- Make the prop properly controlled by JS
- Add a RCTTextSelection class to map the JS object into and the corresponding RCTConvert category
- Make sure the selection change event is properly triggered when the input is focused
- Cleanup setSelection
- Changed TextInput to use function refs to appease the linter

** Test plan **
Tested using the TextInput selection example in UIExplorer on iOS.
Also tested that it doesn't break Android.
Closes https://github.com/facebook/react-native/pull/8958

Differential Revision: D3771229

Pulled By: javache

fbshipit-source-id: b8ede46b97fb3faf3061bb2dac102160c4b20ce7
2016-08-25 17:28:37 -07:00
..
2016-08-24 02:58:32 -07:00
2015-07-24 08:41:58 -08:00
2016-08-23 14:13:52 -07:00
2016-08-09 06:43:46 -07:00
2016-08-09 06:43:46 -07:00
2016-08-05 12:44:20 -07:00
2016-07-06 12:58:41 -07:00
2016-08-09 06:43:46 -07:00
2016-08-23 10:28:53 -07:00
2016-07-14 11:13:27 -07:00
2016-08-09 06:43:46 -07:00
2016-08-09 06:43:46 -07:00
2016-08-09 06:43:46 -07:00
2016-07-19 10:43:29 -07:00
2016-08-17 10:44:01 -07:00
2016-08-18 20:58:39 -07:00
2016-08-16 16:13:51 -07:00
2016-08-09 06:43:46 -07:00
2016-07-25 03:43:29 -07:00
2016-08-09 06:43:46 -07:00
2016-08-12 07:28:38 -07:00