From 13ddd15d09364b495b5c5f73deb87a20b017cecf Mon Sep 17 00:00:00 2001 From: Horcrux Date: Tue, 30 Aug 2016 09:37:52 +0800 Subject: [PATCH] add ios code --- ios/ViewManagers/RNSVGTSpanManager.h | 13 +++++++++++++ ios/ViewManagers/RNSVGTSpanManager.m | 28 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 ios/ViewManagers/RNSVGTSpanManager.h create mode 100644 ios/ViewManagers/RNSVGTSpanManager.m diff --git a/ios/ViewManagers/RNSVGTSpanManager.h b/ios/ViewManagers/RNSVGTSpanManager.h new file mode 100644 index 00000000..0eb2f24a --- /dev/null +++ b/ios/ViewManagers/RNSVGTSpanManager.h @@ -0,0 +1,13 @@ +/** + * Copyright (c) 2015-present, Horcrux. + * All rights reserved. + * + * This source code is licensed under the MIT-style license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import "RNSVGRenderableManager.h" + +@interface RNSVGTSpanManager : RNSVGRenderableManager + +@end diff --git a/ios/ViewManagers/RNSVGTSpanManager.m b/ios/ViewManagers/RNSVGTSpanManager.m new file mode 100644 index 00000000..f7ad7eb8 --- /dev/null +++ b/ios/ViewManagers/RNSVGTSpanManager.m @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2015-present, Horcrux. + * All rights reserved. + * + * This source code is licensed under the MIT-style license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import "RNSVGTSpanManager.h" + +#import "RNSVGTSpan.h" +#import "RCTConvert+RNSVG.h" + +@implementation RNSVGTSpanManager + +RCT_EXPORT_MODULE() + +- (RNSVGRenderable *)node +{ + return [RNSVGTSpan new]; +} + +RCT_EXPORT_VIEW_PROPERTY(alignment, CTTextAlignment) +RCT_REMAP_VIEW_PROPERTY(frame, textFrame, RNSVGTextFrame) +RCT_EXPORT_VIEW_PROPERTY(dx, NSString) +RCT_EXPORT_VIEW_PROPERTY(dy, NSString) + +@end