You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by cx...@apache.org on 2017/04/10 05:53:58 UTC
[08/15] incubator-weex git commit: * [ios] Add public method to
trigger display
* [ios] Add public method to trigger display
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a069edb7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a069edb7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a069edb7
Branch: refs/heads/0.12-dev
Commit: a069edb7ad815893eb2e330307bca5c211ebacfd
Parents: 3844a25
Author: \u9690\u98ce <cx...@apache.org>
Authored: Thu Apr 6 15:59:20 2017 +0800
Committer: \u9690\u98ce <cx...@apache.org>
Committed: Thu Apr 6 15:59:20 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m | 5 +++++
ios/sdk/WeexSDK/Sources/Model/WXComponent.h | 5 +++++
2 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a069edb7/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m b/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m
index 0d4bca1..a72e84d 100644
--- a/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m
+++ b/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m
@@ -191,6 +191,11 @@
}
}
+- (void)triggerDisplay
+{
+ [self _willDisplayLayer:_layer];
+}
+
- (CGContextRef)beginDrawContext:(CGRect)bounds
{
UIGraphicsBeginImageContextWithOptions(bounds.size, [self _bitmapOpaqueWithSize:bounds.size], 0.0);
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a069edb7/ios/sdk/WeexSDK/Sources/Model/WXComponent.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.h b/ios/sdk/WeexSDK/Sources/Model/WXComponent.h
index bec45d1..c2cc3b9 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.h
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.h
@@ -361,6 +361,11 @@ NS_ASSUME_NONNULL_BEGIN
- (void)readyToRender;
/**
+ * @abstract trigger display if you do not have a WXLayer
+ */
+- (void)triggerDisplay;
+
+/**
* @abstract Creates a graphics context with the specified bounds, the context will be used for `drawRect:` in compositing environment
* @discussion You can override this method to use your own graphics context.
*/