[iOS] Strange gradient appears when using `borderTopLeftRadius` (or similar) inside a scaled `View`
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 127k
- Fork
- 25.3k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
Description
See snack reproduction: https://snack.expo.dev/@whiteroseeducation/ios-bordertopleftradius-gradient-issue
The issue only appears on iOS devices.
When two conditions are met, you see weird gradients near the corners. These conditions are:
- The
Viewhas style which sets the border corners to different radius values, e.g. withborderTopLeftRadius. - The
Viewis nested in aViewwhich has a shrinking scale transform.
E.g.
<View
style={{
width: 400,
height: 400,
transform: [{ scale: 0.5 }],
}}>
<View
style={{
width: '100%',
height: '100%',
backgroundColor: 'white',
borderColor: 'navy',
borderWidth: 8,
borderTopLeftRadius: 40,
}}
/>
</View>
Steps to reproduce
- Click snack link above
- Run on an iOS device or simulator
- Observe that the first shape (labelled "The issue") has weird gradients in it, which aren't specified by its style
React Native Version
0.76.7
Affected Platforms
Runtime - iOS
Reproducer
https://snack.expo.dev/@whiteroseeducation/ios-bordertopleftradius-gradient-issue
Screenshots and Videos
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với bản tái hiện Snack được liên kết và chạy nó trên thiết bị hoặc trình mô phỏng iOS bằng React Native 0.76.7. So sánh View bên ngoài đã được scale với View bên trong có borderTopLeftRadius; hoàn tất khi hình dạng bị ảnh hưởng không còn hiển thị các dải màu không có trong style của nó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- ios, react-native
- Lĩnh vực
- mobile
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100