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

Commit 71268b5

Browse files
committed
修改属性为BOOL
1 parent 7cda54c commit 71268b5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ typedef id (^WXDataBindingBlock)(NSDictionary *data, BOOL *needUpdate);
7070
NSString * _accessibilityHintContent; // hint for the action
7171
NSString * _groupAccessibilityChildren; // voice-over navigation order
7272
NSString * _testId;// just for auto-test
73-
NSString * _userInteractionEnabled;
7473

74+
BOOL _userInteractionEnabled;
7575
BOOL _accessibilityMagicTapEvent;
7676

7777
/**

ios/sdk/WeexSDK/Sources/Model/WXComponent.mm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ - (instancetype)initWithRef:(NSString *)ref
9999
_isViewFrameSyncWithCalculated = YES;
100100
_ariaHidden = nil;
101101
_accessible = nil;
102-
_userInteractionEnabled = nil;
102+
_userInteractionEnabled = YES;
103103
_accessibilityHintContent = nil;
104104
_cancelsTouchesInView = YES;
105105

@@ -121,7 +121,7 @@ - (instancetype)initWithRef:(NSString *)ref
121121
}
122122

123123
if (attributes[@"userInteractionEnabled"]) {
124-
_userInteractionEnabled = [WXConvert NSString:attributes[@"userInteractionEnabled"]];
124+
_userInteractionEnabled = [WXConvert BOOL:attributes[@"userInteractionEnabled"]];
125125
}
126126

127127
if (attributes[@"ariaHidden"]) {
@@ -425,7 +425,7 @@ - (UIView *)view
425425
[_view setIsAccessibilityElement:[WXConvert BOOL:_accessible]];
426426
}
427427
if (_userInteractionEnabled) {
428-
[_view setUserInteractionEnabled:[WXConvert BOOL:_userInteractionEnabled]];
428+
[_view setUserInteractionEnabled:_userInteractionEnabled];
429429
}
430430
if (_ariaHidden) {
431431
[_view setAccessibilityElementsHidden:[WXConvert BOOL:_ariaHidden]];
@@ -887,8 +887,8 @@ - (void)_configWXComponentA11yWithAttributes:(NSDictionary *)attributes
887887
[self.view setShouldGroupAccessibilityChildren:[WXConvert BOOL:_groupAccessibilityChildren]];
888888
}
889889
if (attributes[@"userInteractionEnabled"]) {
890-
_userInteractionEnabled = [WXConvert NSString:attributes[@"userInteractionEnabled"]];
891-
[self.view setUserInteractionEnabled:[WXConvert BOOL:_userInteractionEnabled]];
890+
_userInteractionEnabled = [WXConvert BOOL:attributes[@"userInteractionEnabled"]];
891+
[self.view setUserInteractionEnabled:_userInteractionEnabled];
892892
}
893893

894894
if (attributes[@"testId"]) {

0 commit comments

Comments
 (0)