Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
修改属性为BOOL
Browse files Browse the repository at this point in the history
  • Loading branch information
Txink committed Aug 9, 2019
1 parent 7cda54c commit 71268b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
Expand Up @@ -70,8 +70,8 @@ typedef id (^WXDataBindingBlock)(NSDictionary *data, BOOL *needUpdate);
NSString * _accessibilityHintContent; // hint for the action
NSString * _groupAccessibilityChildren; // voice-over navigation order
NSString * _testId;// just for auto-test
NSString * _userInteractionEnabled;

BOOL _userInteractionEnabled;
BOOL _accessibilityMagicTapEvent;

/**
Expand Down
10 changes: 5 additions & 5 deletions ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
Expand Up @@ -99,7 +99,7 @@ - (instancetype)initWithRef:(NSString *)ref
_isViewFrameSyncWithCalculated = YES;
_ariaHidden = nil;
_accessible = nil;
_userInteractionEnabled = nil;
_userInteractionEnabled = YES;
_accessibilityHintContent = nil;
_cancelsTouchesInView = YES;

Expand All @@ -121,7 +121,7 @@ - (instancetype)initWithRef:(NSString *)ref
}

if (attributes[@"userInteractionEnabled"]) {
_userInteractionEnabled = [WXConvert NSString:attributes[@"userInteractionEnabled"]];
_userInteractionEnabled = [WXConvert BOOL:attributes[@"userInteractionEnabled"]];
}

if (attributes[@"ariaHidden"]) {
Expand Down Expand Up @@ -425,7 +425,7 @@ - (UIView *)view
[_view setIsAccessibilityElement:[WXConvert BOOL:_accessible]];
}
if (_userInteractionEnabled) {
[_view setUserInteractionEnabled:[WXConvert BOOL:_userInteractionEnabled]];
[_view setUserInteractionEnabled:_userInteractionEnabled];
}
if (_ariaHidden) {
[_view setAccessibilityElementsHidden:[WXConvert BOOL:_ariaHidden]];
Expand Down Expand Up @@ -887,8 +887,8 @@ - (void)_configWXComponentA11yWithAttributes:(NSDictionary *)attributes
[self.view setShouldGroupAccessibilityChildren:[WXConvert BOOL:_groupAccessibilityChildren]];
}
if (attributes[@"userInteractionEnabled"]) {
_userInteractionEnabled = [WXConvert NSString:attributes[@"userInteractionEnabled"]];
[self.view setUserInteractionEnabled:[WXConvert BOOL:_userInteractionEnabled]];
_userInteractionEnabled = [WXConvert BOOL:attributes[@"userInteractionEnabled"]];
[self.view setUserInteractionEnabled:_userInteractionEnabled];
}

if (attributes[@"testId"]) {
Expand Down

0 comments on commit 71268b5

Please sign in to comment.