我首先尝试使用按钮,然后使用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在其边框的每一边都有相同的宽度。为什么会这样?