Repository: incubator-weex Updated Branches: refs/heads/0.16-dev 6f15eb0f4 -> 781296f44
* [ios] fix _styles access crash Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/781296f4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/781296f4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/781296f4 Branch: refs/heads/0.16-dev Commit: 781296f44c1ab4cfdd4cd0bd287fa9b9b2c3b9af Parents: 6f15eb0 Author: acton393 <zhangxing610...@gmail.com> Authored: Mon Aug 28 15:54:24 2017 +0800 Committer: acton393 <zhangxing610...@gmail.com> Committed: Mon Aug 28 15:54:24 2017 +0800 ---------------------------------------------------------------------- ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/781296f4/ios/sdk/WeexSDK/Sources/Model/WXComponent.m ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m index c2424c0..81f8178 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m +++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m @@ -447,9 +447,7 @@ _transition = [WXTransition new]; } [_transition _handleTransitionWithStyles:styles withTarget:self]; - } - else - { + } else { styles = [self parseStyles:styles]; [self _updateCSSNodeStyles:styles]; } @@ -463,7 +461,7 @@ - (BOOL)_isPropertyTransitionStyles:(NSDictionary *)styles { BOOL yesOrNo = false; - NSString *property = _styles[kWXTransitionProperty]; + NSString *property = self.styles[kWXTransitionProperty]; if (property) { if (([property containsString:@"width"]&&styles[@"width"]) ||([property containsString:@"height"]&&styles[@"height"]) @@ -483,7 +481,7 @@ - (BOOL)_isPropertyAnimationStyles:(NSDictionary *)styles { BOOL yesOrNo = false; - NSString *property = _styles[kWXTransitionProperty]; + NSString *property = self.styles[kWXTransitionProperty]; if (property) { if (([property containsString:@"backgroundColor"]&&styles[@"backgroundColor"]) ||([property containsString:@"transform"]&&styles[@"transform"]) @@ -527,9 +525,7 @@ WXAssertMainThread(); if (![self _isPropertyAnimationStyles:styles]) { [self _updateViewStyles:styles]; - } - else - { + } else { [self _transitionUpdateViewProperty:styles]; }