Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
387 views
in Technique[技术] by (71.8m points)

ios - UITableView corner unrounded on scroll / Swift 5

I'm using Xcode 11.2 and Swift 5

I added this in viewDidLoad(),

tableView.layer.cornerRadius = 10.0
tableView.layer.masksToBounds = true

but corners get unrounded when I scroll like the second image.

image1

image2

How can I keep UITableView's corners rounded even on scroll? I can achieve this by setting corner radius to UITableViewCell but I preferably want to use UITableView.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...