Commit Graph

134 Commits

Author SHA1 Message Date
Clay Allsopp 11f204748d Add SegmentedControlIOS
Summary:
Fixes #534:

![screen shot 2015-03-31 at 7 52 10 pm](https://cloud.githubusercontent.com/assets/153704/6934038/742ddd34-d7e3-11e4-8f55-3eb7d9d3f1cd.png)

```jsx
<SegmentedControlIOS
  tintColor="#ff0000"
  values={['One', 'Two', 'Three', 'Four']}
  selectedtIndex={0}
  momentary={false}
  enabled={true}
  onValueChange={ (value) => console.log(value) } />
```

This only supports string-based segments, not images. Also doesn't support full customization (no separator images etc); I figure this is a good MVP to lock-down a basic API

I also included a snapshot test case, but the images keep coming out funky. When I look at the sim, I see that the text labels show up for the selected segment, but the snapshot keeps coming out with no text on those segments. I tried forcing a delay, but same result. Is that explainable?

Obviously happy to change anything about the API, code-style nitpicks, etc
Closes https://github.com/facebook/react-native/pull/564
Github Author: Clay Allsopp <clay.allsopp@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-29 08:08:45 -08:00
Brent Vatne c09bdebcd5 Add support for multiline TextInput via UITextView
Summary:
@nicklockwood - Could I get a review of this?

Just took `RCTTextField` and ported it from `UITextField` to `UITextView` as you mentioned in another discussion, and removed any `UITextField` specific attributes.

- How do you think this should behave when there are subviews?
- Do you know how we can respond to the `UIControlEventEditingDidEndOnExit` event to respond to submit? Because `UITextView` isn't a `UIControl` we can't just use `addTarget` with `UIControlEventEditingDidEndOnExit`.
- Any other feedback?

Still going to look over the `UITextView` docs in more detail and make sure we expose all important options, and add it to the UIExplorer example, just putting this out here for feedback.

![multiline](https://cloud.githubusercontent.com/assets/90494/7310854/32174d6a-e9e8-11e4-919e-71e54cf3c739.gif)

Closes https://github.com/facebook/react-native/pull/991
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-29 01:33:58 -08:00
Gabe Levi b6e6dae6ba [Flow] Properly fix new errors as of Flow v0.10. 2015-04-27 14:56:21 -08:00
Alex Akers 826b56a41b [React Native] Update RCTView border implementation 2015-04-27 04:10:43 -08:00
Nick Lockwood 77e38b26c5 Improved RCTActivityIndicatorView and fixed some flow errors 2015-04-26 02:17:13 -08:00
Spencer Ahrens 68eb3e4906 [ReactNative] geolocation method docs 2015-04-24 16:26:28 -08:00
Krzysztof Magiera 46db1826c5 [react_native] JS files from D2017699: Expose JavaScriptEnabled property for WebView component on android. 2015-04-24 11:53:35 -08:00
Alex Kotliarskyi 1f1c6af9cd [ReactNative] Add instructions for new `react-native bundle` 2015-04-23 15:34:07 -08:00
Eduardo aa3d343547 NavigatorIOS custom nav bar colors
Summary:
NavigatorIOS with custom nav bar custom colors, working example included in
UIExplorer.

Based on pull request #318 to complete pending work based on comments.
Closes https://github.com/facebook/react-native/pull/695
Github Author: Eduardo <edo.lomeli@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-23 06:32:35 -08:00
Mike Wilcox 17e5b04d1a Fix Typo
Summary:
* This PR fixes a typo for the NetInfo docs page
Closes https://github.com/facebook/react-native/pull/937
Github Author: Mike Wilcox <mwilcox56@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-21 16:41:34 -08:00
Nick Lockwood bbd5259586 Fixed reachability 2015-04-20 08:33:56 -08:00
Nick Lockwood ead0f2e020 Implemented thread control for exported methods 2015-04-18 11:13:39 -08:00
Spencer Ahrens 915151c5d7 [ReactNative] verifyPropTypes against native exports 2015-04-16 18:15:36 -08:00
Alex Kotliarskyi df77c5ef1c Add test target to SampleApp 2015-04-15 09:26:57 -08:00
guru inamdar 7a68691686 MapView to support MKPointAnnotation using new attribute annotate in Map...
Summary:
### MapView to support Pin annotation

    var pinLocation = {
			latitude: property.latitude,
			longitude: property.longitude,
			title: property.title
    };
    this.state = {propertyPoint: pinLocation};
    <MapView style={styles.map} region={this.state.region} annotate={this.state.propertyPoint}>
    </MapView>
![mapview-pinannotation](https://cloud.githubusercontent.com/assets/845379/7100280/6c1ffc08-dfe5-11e4-9d1b-8da6a65da1bc.png)

Closes https://github.com/facebook/react-native/pull/810
Github Author: guru inamdar <guru.inamdar@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-14 18:03:37 -08:00
Tadeu Zagallo 8d651a0353 [ReactNative] Sort UIExplorer examples 2015-04-13 04:34:23 -08:00
jcgertig 8d643224ee Link LinkingIOS in SampleApp
Summary:
Closes https://github.com/facebook/react-native/pull/656
Github Author: jcgertig <jcgertig@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-09 17:33:45 -08:00
Will Piers c831328dcf unify use of password and secureTextEntry for TextInput
Summary:
Currently, the documentation shows both `password` and `secureTextEntry` as props for TextInput. However, the `password` prop is only passed to the Android component, so it does not work as expected for iOS developers. This PR prefers `password` over `secureTextEntry` but won't break anybody's code.
Closes https://github.com/facebook/react-native/pull/622
Github Author: Will Piers <wpiers@rallydev.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-09 17:17:44 -08:00
Brent Vatne 17ab4f2fb3 Ensure that NSLocationWhenInUseUsageDescription is set, throw error if not
Summary:
As per #750, throw error when trying to use the geolocation module and this key is not set. cc @frantic
Closes https://github.com/facebook/react-native/pull/762
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-08 21:28:16 -08:00
Spencer Ahrens 9ea0002774 [ReactNative] fixup AnimationExperimental a bit 2015-04-08 14:09:32 -08:00
Alex Akers 8a57c4e980 [React Native] RCT_EXPORT lvl.2 2015-04-08 08:34:10 -08:00
Nick Lockwood bf4868edda Added non-class-scanning-based approach fror registering js methods 2015-04-08 05:45:20 -08:00
Nick Lockwood 80cd687e95 Refactored RCTLog and added facility to prepend extra data to the log message 2015-04-07 07:35:57 -08:00
Rob McVey 2aa52880b7 Add promise support to AsyncStorage
Summary:
Since `AsyncStorage` is the primary cache, it would be nice to stick with fetch's promise model and make the common use-case of:
1) check cache
2) make request if cache is invalid
more straightforward. Currently if I want to check a cache prior to using fetch (or another promise-based XHR lib) I have to provide a callback. I left the callback support and `resolve`/`reject` the promise after the callback has been applied.
Closes https://github.com/facebook/react-native/pull/593
Github Author: Rob McVey <mcvey@thecollective-la.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-07 01:45:26 -08:00
Spencer Ahrens 620bfb699b [ReactNative] rename Animation to AnimationExperimental with warning docs 2015-04-04 11:20:45 -08:00
Eric Vicenti 34ed3a0cec [ReactNative] Start Navigator gesture config, disable gesture in AdsManager 2015-04-03 14:11:32 -08:00
Gabe Levi 6e6bd28f3a [Flow] Clean react-native-github for Flow v0.8.0 2015-04-03 13:32:42 -08:00
Robbie McCorkell f652e8eeaa [UIExplorer] Fixed 'Push View Example' in NavigatorIOS example
Summary:
Fixed NavigatorIOSExample to render ViewExample using `createExamplePage(null, ViewExample)`
Closes https://github.com/facebook/react-native/pull/419
Github Author: Robbie McCorkell <robbiemccorkell@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-03 09:54:59 -08:00
Christopher Chedeau 4d44d9cca2 [ReactNative] Cleanup TabBar and its example 2015-04-02 13:51:59 -08:00
laiso e35521300a (Xcode) Set indent=2 in all xcodeproj files.
Summary:
These are default settings now.
I saw my Xcode be configured indent=4.

![2015-03-30 12 16 11 pm](https://cloud.githubusercontent.com/assets/39830/6889697/98f8b930-d6d6-11e4-81c8-d2146855d127.png)

Closes https://github.com/facebook/react-native/pull/472
Github Author: laiso <laiso@lai.so>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-01 17:14:45 -08:00
sungwook yeom 45344d2869 [react-native] Fix dev menu keyboard shortcut in sample app
Summary:
To press Cmd+Shift+Z in Sample App on the iOS Simulator is nothing happen.

To press Cmd+Control+Z is showing dev menu.
Closes https://github.com/facebook/react-native/pull/598
Github Author: sungwook yeom <sungwook.yeom@samsung.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-01 16:39:53 -08:00
Eric Vicenti a1e6d70ec9 [ReactNative] Fix doc page for PushNotificationIOS 2015-04-01 13:19:42 -08:00
Eric Vicenti 5a6bf00223 [ReactNative] Rename NavigationBar props 2015-04-01 07:43:22 -08:00
Christopher Chedeau e8155c94dd [ReactNative] Normalize name for examples 2015-03-31 20:49:24 -08:00
Don Yu 414d975370 make renderError and renderLoading props optional for WebView
Summary:
@vjeux Making the renderError and renderLoading props optional for WebView by setting the default to be what's shown for the WebView example in UIExplorer. issue #349
Closes https://github.com/facebook/react-native/pull/512
Github Author: Don Yu <donyu8@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-03-31 18:54:47 -08:00
Alex Kotliarskyi 9e931e9d36 [ReactNative] Add few hints in the UI 2015-03-31 16:15:40 -08:00
Jiajie Zhu a0998abd19 [catalyst] fix typo 2015-03-31 14:57:45 -08:00
James Ide ac0ad3acdd [TextInput] returnKeyType, enablesReturnKeyAutomatically, secureTextEntry, more keyboardTypes
Summary:
This diff completes adding support for the following UITextField properties:

- returnKeyType: what the return key on the keyboard says
- enablesReturnKeyAutomatically: the return key is disabled iff there is no text entered. This too could be implemented in React but it feels better in UIKit right now because it is handled synchronously.
- secureTextEntry: obscure passwords
- keyboardType: added all the keyboard types, they are useful in different scenarios

There were varying degrees of support for these properties so it looks like this diff continues some unfinished work. I also updated the keyboardType enum to use native constants instead of strings like the other properties here.

Added examples to the UIExplorer.
Closes https://github.com/facebook/react-native/pull/265
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-03-30 18:13:30 -08:00
Nick Lockwood a2cfc5feca Changed LayoutAnimation to use ms instead of seconds for consistency 2015-03-30 06:31:42 -08:00
Nick Lockwood 961f301d65 Renamed throttleScrollCallbackMS to scrollEventThrottle 2015-03-30 04:56:59 -08:00
Radu Marin 5865cfa956 [iOS][Assets]: Cleaning up more 1x png from Libraries 2015-03-29 11:42:30 -08:00
Amjad Masad c94f7c3656 [React Native] Sync from github 2015-03-27 22:09:11 -08:00
Tadeu Zagallo 0fdf8b4a95 [ReactNative] Use one key and add comment on the movies app 2015-03-27 15:33:26 -08:00
Alex Kotliarskyi edff192c9e [ReactNative] Make it easier to generate offline bundles 2015-03-27 09:31:24 -08:00
Nick Lockwood 698988017c Added support for text padding 2015-03-27 09:21:27 -08:00
Leonardo YongUk Kim 701dd1f9b4 Fix sourceTree of RCTActionSheet.xcodeproj
Summary:
`File not found` occurs in AppCode.

`sourceTree` of `RCTActionSheet.xcodeproj` is `<absolute>`. Because path is `../../Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj`, that sourceTree is wrong.

Closes #338
Closes https://github.com/facebook/react-native/pull/344
Github Author: Leonardo YongUk Kim <dalinaum@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-03-27 07:46:57 -08:00
Krzysztof Magiera 02ff4955fd [react_native] Update default bundle name to org.reactjs.native.* 2015-03-26 11:01:52 -08:00
Alex Kotliarskyi d88716fba8 [ReactNative] UIViewControllerBasedStatusBarAppearance = NO in SampleApp 2015-03-26 07:25:19 -08:00
Eric Vicenti 2448946a7e [ReactNative] Navigator Example Overhaul 2015-03-26 05:58:38 -08:00
Tadeu Zagallo 20291a02df [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00