UIView边框有不同的宽度。为什么?

时间:2016-04-11 20:30:09

标签: ios swift uiview uilabel border

以下是图片:enter image description here

我首先尝试使用按钮,然后使用UILabels在UIViews之上,但问题仍然存在。这是我的代码:

    interView = UIView()
    interView.backgroundColor = UIColor.clearColor()
    interView.layer.borderWidth = 0.4
    interView.layer.borderColor = UIColor.blackColor().colorWithAlphaComponent(0.4).CGColor
    interView.frame = CGRectMake(0, 0, 130, 70)
    interView.layer.shadowColor = UIColor.clearColor().CGColor
    self.view.addSubview(interView)

所以,我希望我的UIView在其边框的每一边都有相同的宽度。为什么会这样?

0 个答案:

没有答案