You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2017/05/05 11:25:50 UTC
[17/23] incubator-weex git commit: + [ios] add slider switch function
+ [ios] add slider switch function
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/850d846f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/850d846f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/850d846f
Branch: refs/heads/0.13-dev
Commit: 850d846f65e912f07bc899a4e277811696171c3a
Parents: 4794dd7
Author: 齐山 <su...@163.com>
Authored: Fri May 5 15:30:39 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Fri May 5 15:30:39 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/850d846f/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index c546d42..ff1532c 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -196,6 +196,12 @@ typedef enum : NSUInteger {
if ([configCenter respondsToSelector:@selector(configForKey:defaultValue:isDefault:)]) {
BOOL useCoreText = [[configCenter configForKey:@"iOS_weex_ext_config.text_render_useCoreText" defaultValue:@false isDefault:NULL] boolValue];
[WXTextComponent setRenderUsingCoreText:useCoreText];
+ NSString *className = [[configCenter configForKey:@"iOS_weex_ext_config.slider_class_name" defaultValue:@"WXSliderComponent" isDefault:NULL] stringValue];
+ if(className.length>0){
+ [WXSDKEngine registerComponent:@"slider" withClass:NSClassFromString(className)];
+ }else{
+ [WXSDKEngine registerComponent:@"slider" withClass:NSClassFromString(@"WXSliderComponent")];
+ }
}
[[WXSDKManager bridgeMgr] createInstance:self.instanceId template:mainBundleString options:dictionary data:_jsData];