Passing in CGPoints instead of NSArrays for start/end.

This commit is contained in:
Tj 2015-08-18 17:34:49 -04:00
parent 6dcee98b6d
commit 7c6695ea1d
2 changed files with 6 additions and 6 deletions

View File

@ -24,14 +24,14 @@
self.gradientLayer.colors = colors;
}
- (void)setStart:(NSArray *)start
- (void)setStart:(CGPoint)start
{
self.gradientLayer.startPoint = [RCTConvert CGPoint:start];
self.gradientLayer.startPoint = start;
}
- (void)setEnd:(NSArray *)end
- (void)setEnd:(CGPoint)end
{
self.gradientLayer.endPoint = [RCTConvert CGPoint:end];
self.gradientLayer.endPoint = end;
}
- (void)setLocations:(NSArray *)locations

View File

@ -19,8 +19,8 @@ RCT_EXPORT_MODULE();
}
RCT_EXPORT_VIEW_PROPERTY(colors, NSArray);
RCT_EXPORT_VIEW_PROPERTY(start, NSArray);
RCT_EXPORT_VIEW_PROPERTY(end, NSArray);
RCT_EXPORT_VIEW_PROPERTY(start, CGPoint);
RCT_EXPORT_VIEW_PROPERTY(end, CGPoint);
RCT_EXPORT_VIEW_PROPERTY(locations, NSArray);
@end