Skip to content

Commit 5f13612

Browse files
author
pioner921227
committed
fix press bug
1 parent 9be99d1 commit 5f13612

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

example/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default function App() {
5656
// defaultRadius={20}
5757
// shimmerBackgroundColor={'#cccc'}
5858
// gradientColors={['red', 'blue']}
59-
animationType={'none'} // 'gradient' | 'pulse' | 'none'
59+
animationType={'gradient'} // 'gradient' | 'pulse' | 'none'
6060
isLoading={isLoading}
6161
>
6262
<View style={s.avatarWithName}>

ios/React/AutoSkeletonIgnoreView.mm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ -(instancetype)init
3434
self.accessibilityIdentifier = Constants.IGNORE_VIEW_NAME;
3535

3636
_view = [UIView new];
37+
_view.userInteractionEnabled = NO;
3738
self.contentView = _view;
3839
}
3940
return self;
@@ -47,7 +48,8 @@ - (instancetype)initWithFrame:(CGRect)frame
4748

4849
self.accessibilityIdentifier = Constants.IGNORE_VIEW_NAME;
4950

50-
_view = [[UIView alloc] init];
51+
_view = [UIView new];
52+
_view.userInteractionEnabled = NO;
5153

5254
self.contentView = _view;
5355
}

ios/React/AutoSkeletonView.mm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ + (ComponentDescriptorProvider)componentDescriptorProvider {
3232
- (instancetype)init {
3333
if (self = [super init]) {
3434
_view = [SkeletonViewFabric new];
35+
_view.userInteractionEnabled = NO;
3536

3637
self.contentView = _view;
3738
}
@@ -44,7 +45,8 @@ - (instancetype)initWithFrame:(CGRect)frame {
4445
std::make_shared<const AutoSkeletonViewProps>();
4546
_props = defaultProps;
4647

47-
_view = [[SkeletonViewFabric alloc] init];
48+
_view = [SkeletonViewFabric new];
49+
_view.userInteractionEnabled = NO;
4850

4951
[_view initOriginalViewsWithSubviews:self.subviews];
5052

ios/React/AutoSkeletonViewManager.mm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ @implementation AutoSkeletonViewManager
5353
}
5454

5555
- (UIView*)view {
56-
return [SkeletonViewOldArch new];
56+
SkeletonViewOldArch* view = [SkeletonViewOldArch new];
57+
view.userInteractionEnabled = NO;
58+
return view;
5759
}
5860

5961
RCT_EXPORT_VIEW_PROPERTY(color, NSString)
@@ -73,6 +75,7 @@ @implementation AutoSkeletonViewIgnoreManager
7375

7476
- (UIView*)view {
7577
UIView* view = [UIView new];
78+
view.userInteractionEnabled = NO;
7679
view.accessibilityIdentifier = Constants.IGNORE_VIEW_NAME;
7780
return view;
7881
}

0 commit comments

Comments
 (0)