我有两个UIViews重叠,角半径。它们都有相同的颜色。我试图找出,如何防止角半径使一个稍微更暗的“边界描边”有谁知道如何防止这种情况?
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
答案 0 :(得分:0)
View.layer.shadowOpacity = 0.0
View.layer.shadowRadius = 0.0
View.layer.shadowColor = UIColor.clear