2021年1月20日星期三

Perfectly rounded corner iOS style in React Native

In Siwft or SwiftUI you can create smooth corners like the image below with 1 line of code. How can I achieve the same result on React Native(iOS)?

Text("Smooth corner")   .padding()   .background(Color.black)   .foregroundColor(.white)   .clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous)) // Make it smooth    Text("Border Radius")   .padding()   .background(Color.blue)   .foregroundColor(.white)    .clipShape(RoundedRectangle(cornerRadius: 12)) // regular borderRadius  

enter image description here

https://stackoverflow.com/questions/65821048/perfectly-rounded-corner-ios-style-in-react-native January 21, 2021 at 12:06PM

没有评论:

发表评论