如何在Interface Builder中创建1px行? [英] How do I create a 1px line in Interface Builder?
本文介绍了如何在Interface Builder中创建1px行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
注意,我想制作1px线,而不是1pt线。意思是它应该是1px而不管屏幕比例(在Retina设备上是0.5pt)。
Note, I'm looking to make a 1px line, not a 1pt line. Meaning it should be 1px regardless of screen scale (so 0.5pt on Retina devices).
我可以通过编程方式执行此操作,但是我可以在Interface Builder中执行此操作吗?例如,我不能将UIView设置为小于1的高度。
I can do this programmatically, but can I do it in the Interface Builder? For example I cannot set a UIView to have a height of less than 1.
如果我可以在IB中执行此操作,那么我不必手动声明插座和手动在中设置框架awakeFromNib
。
If I can do it in IB then I don't have to declare an outlet and manually set the frame in awakeFromNib
.
推荐答案
这篇关于如何在Interface Builder中创建1px行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文