Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: weex playground add lottie & lottie bindingx extend
- Loading branch information
对象
committed
Sep 14, 2018
1 parent
e2a33a0
commit 49d4562
Showing
8 changed files
with
415 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
weex/playground/ios/WeexDemo/lottie/WXLottieBindingXHandler.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Created by Weex. | ||
* Copyright (c) 2016, Alibaba, Inc. All rights reserved. | ||
* | ||
* This source code is licensed under the Apache Licence 2.0. | ||
* For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#import "EBHandlerFactory.h" | ||
|
||
@interface WXLottieBindingXHandler : NSObject <EBHandlerProtocol> | ||
|
||
@end |
24 changes: 24 additions & 0 deletions
24
weex/playground/ios/WeexDemo/lottie/WXLottieBindingXHandler.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Created by Weex. | ||
* Copyright (c) 2016, Alibaba, Inc. All rights reserved. | ||
* | ||
* This source code is licensed under the Apache Licence 2.0. | ||
* For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#import "WXLottieBindingXHandler.h" | ||
#import "WXLottieComponent.h" | ||
|
||
@implementation WXLottieBindingXHandler | ||
|
||
- (void)execute:(NSDictionary *)properties to:(id)target { | ||
if ([target isKindOfClass:WXLottieComponent.class]) { | ||
id progress = properties[@"lottie-progress"]; | ||
if (progress) { | ||
WXLottieComponent *lottie = (WXLottieComponent *)target; | ||
[lottie setProgress:[WXConvert CGFloat:progress]]; | ||
} | ||
} | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Created by Weex. | ||
* Copyright (c) 2016, Alibaba, Inc. All rights reserved. | ||
* | ||
* This source code is licensed under the Apache Licence 2.0. | ||
* For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <WeexSDK/WeexSDK.h> | ||
#import <WeexSDK/WXResourceLoader.h> | ||
#import <WeexPluginLoader/WeexPluginLoader.h> | ||
|
||
@interface WXLottieComponent : WXComponent | ||
|
||
- (void)setProgress:(CGFloat)progress; | ||
|
||
@end |
Oops, something went wrong.