删除角半径iOS上的阴影/边界线

时间:2017-02-27 12:40:43

标签: ios swift uiview

我有两个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

Example

1 个答案:

答案 0 :(得分:0)

View.layer.shadowOpacity = 0.0
View.layer.shadowRadius = 0.0
View.layer.shadowColor = UIColor.clear