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/03/29 06:48:56 UTC

[04/18] incubator-weex git commit: * [ios] bugfix div accessibility

* [ios] bugfix div accessibility


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/896ffe83
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/896ffe83
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/896ffe83

Branch: refs/heads/0.12-dev
Commit: 896ffe83e556f0897745ec68a53cf4f986ee5bb2
Parents: 6a2da1f
Author: acton393 <zh...@gmail.com>
Authored: Wed Mar 22 17:20:21 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Wed Mar 22 17:20:21 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/896ffe83/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m b/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m
index 92c964b..05bd54d 100644
--- a/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m
+++ b/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m
@@ -205,6 +205,10 @@
         [self.ancestorScroller adjustSticky];
     }
     
+    if (0 == [[self.view subviews] count]) {
+        self.view.isAccessibilityElement = YES;
+        self.view.accessibilityFrame = [[self.view superview] convertRect:self.calculatedFrame toView:nil];
+    }
     [self layoutDidFinish];
 }