Commit Graph

19 Commits

Author SHA1 Message Date
Nick Lockwood c5b990f65f Added lightweight generic annotations
Summary: public

Added lightweight genarics annotations to make the code more readable and help the compiler catch bugs.

Fixed some type bugs and improved bridge validation in a few places.

Reviewed By: javache

Differential Revision: D2600189

fb-gh-sync-id: f81e22f2cdc107bf8d0b15deec6d5b83aacc5b56
2015-11-03 14:49:30 -08:00
rocman 7236788f34 Memory Leaks caused by RCTNavigator
Summary: releasing the viewControllers referred by _navigationController.viewControllers, which is also releasing the related views
Closes https://github.com/facebook/react-native/pull/3808

Reviewed By: svcscm

Differential Revision: D2604735

Pulled By: javache

fb-gh-sync-id: f202d155f04169f3f0f0ef26365b37b8525b6687
2015-11-02 10:08:33 -08:00
rocman 772010a9af Add controller to closest parent on time so as to fix the automaticallyAdjustContentInsets feature.
Summary: Here's the bug to fix:
https://github.com/facebook/react-native/issues/898
Closes https://github.com/facebook/react-native/pull/3509

Reviewed By: svcscm

Differential Revision: D2574869

Pulled By: javache

fb-gh-sync-id: 8d947c2a0edcfb695c2e209c7b44ae6417b6233e
2015-10-23 03:15:25 -07:00
Alexey Lang e727fc817b Pause JS DisplayLink if nothing to process.
Reviewed By: @jspahrsummers

Differential Revision: D2489107
2015-09-29 09:22:10 -07:00
Nick Lockwood 848839858b Added mechanism for directly mapping JS event handlers to blocks
Summary:
Currently, the system for mapping JS event handlers to blocks is quite clean on the JS side, but is clunky on the native side. The event property is passed as a boolean, which can then be checked by the native side, and if true, the native side is supposed to send an event via the event dispatcher.

This diff adds the facility to declare the property as a block instead. This means that the event side can simply call the block, and it will automatically send the event. Because the blocks for bubbling and direct events are named differently, we can also use this to generate the event registration data and get rid of the arrays of event names.

The name of the event is inferred from the property name, which means that the property for an event called "load" must be called `onLoad` or the mapping won't work. This can be optionally remapped to a different property name on the view itself if necessary, e.g.

  RCT_REMAP_VIEW_PROPERTY(onLoad, loadEventBlock, RCTDirectEventBlock)

If you don't want to use this mechanism then for now it is still possible to declare the property as a BOOL instead and use the old mechanism (this approach is now deprecated however, and may eventually be removed altogether).
2015-09-02 06:11:24 -08:00
Nick Lockwood 88e0bbc469 Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
Nick Lockwood 48af214216 Simplified event registration
Summary:
Our events all follow a common pattern, so there's no good reason why the configuration should be so verbose. This diff eliminates that redundancy, and gives us the freedom to simplify the underlying mechanism in future without further churning the call sites.
2015-08-11 06:41:04 -08:00
Nick Lockwood 1fb26d4319 Cleanup 2015-07-31 11:33:22 -08:00
Tadeu Zagallo 49b55804b1 [ReactNative] Fix crash when reload during profile (attempt #2)
Summary:
Fixes #1642

When reloading during profiling, the profile wouldn't unhook from the instance
being deallocated.
2015-07-22 11:02:32 -08:00
Natansh Verma f21e79d5e1 Revert "[ReactNative] Fix crash when reload during profile" 2015-07-07 23:37:07 -08:00
Tadeu Zagallo 0ffb2d36eb [ReactNative] Fix crash when reload during profile
Summary:
Fixes #1642

When reloading during profiling, the profile wouldn't unhook from the instance
being deallocated.
2015-07-07 18:31:17 -08:00
Nick Lockwood 650fc9de4c Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues
Summary:
@public

I've increased the warning levels in the OSS frameworks, which caught a bunch of minor issues. I also fixed some new errors in Xcode 7 relating to designated initializers and TLS security.

Test Plan:
* Test the sample apps and make sure they still work.
* Run tests.
2015-06-15 07:52:50 -08:00
Tadeu Zagallo 4fc15dbf17 [ReactNative] Implement proper event coalescing 2015-05-27 20:41:20 -08:00
Iragne 88715e5c93 Update RCTNavigator.m
Summary:
Related to this issue
I created the PR.
Feel free to talk about it.

https://github.com/facebook/react-native/issues/65#issuecomment-93240332

Thanks
Closes https://github.com/facebook/react-native/pull/1131
Github Author: Iragne <adelskott@gmail.com>

Test Plan: Open NavigatorIOS example in UIExplorer, push recurse navigation several times. Press back and observe that it no longer breaks.
2015-05-05 08:32:14 -08:00
Tadeu Zagallo 132a9170f1 [ReactNative] Create private underlying bridge to prevent retain cycles 2015-05-04 10:36:20 -08:00
Ben Alpert dd56ccb9c7 [react-native] Fix capitalization of "REact" 2015-04-27 13:52:57 -08:00
Tadeu Zagallo 75e4e124fa [ReactNative] Use a single DisplayLink held by the bridge 2015-04-15 07:07:48 -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 20291a02df [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00