Files
react-native-linear-gradient/BVLinearGradient/BVLinearGradientManager.m
T
Sam Mueller a77528523e Rename start & end properties to fix conflict with RN 51
A recent commit in RN added start/end properties to RCTViewManager.
Because LinearGradient inherits from this class and has properties of
the same name, RN gets mixed up and tries to convert to a YGValue
instead of CGPoint, which results in the exception:

```
Error setting property 'start' of BVLinearGradient with tag #18: JSON
value '{
    x = 0;
    y = 0;
}' of type NSMutableDictionary cannot be converted to a YGValue.
```
2017-12-14 12:09:56 -08:00

27 lines
514 B
Objective-C

#import "BVLinearGradientManager.h"
#import "BVLinearGradient.h"
#import <React/RCTBridge.h>
@implementation BVLinearGradientManager
RCT_EXPORT_MODULE();
@synthesize bridge = _bridge;
- (UIView *)view
{
return [[BVLinearGradient alloc] init];
}
- (dispatch_queue_t)methodQueue
{
return dispatch_get_main_queue();
}
RCT_EXPORT_VIEW_PROPERTY(colors, NSArray);
RCT_EXPORT_VIEW_PROPERTY(startPoint, CGPoint);
RCT_EXPORT_VIEW_PROPERTY(endPoint, CGPoint);
RCT_EXPORT_VIEW_PROPERTY(locations, NSArray);
@end