我有两个UIViews与拐角半径重叠。他们有相同的颜色。我试图找出,如何防止拐角半径做出一个稍微黑暗的“边框中风”有谁知道如何防止这种情况?移除拐角半径处的阴影/边界线iOS
var topHistoryLine : UIView
var bottomHistoryLine :UIView
topHistoryLine.layer.clipsToBounds = topHistoryLine.bounds.width/2
topHistoryLine.clipsToBounds = true
bottomHistoryLine.layer.cornerRadius = bottomHistoryLine.bounds.width/2
bottomHistoryLine.clipsToBounds = true
topHistoryLine.layer.shadowOpacity = 0.0
bottomHistoryLine.layer.shadowOpacity = 0.0
添加代码。图像根本不清楚。 – hasan83
添加代码;)。图像放大很多,使较暗的线条可见。这是一个非常小的细节,几乎不可能看到。 –