How do I create a 1px line in Interface Builder?

后端 未结 10 1771
独厮守ぢ
独厮守ぢ 2020-12-04 10:30

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).

I can do this programmatica

10条回答
  •  粉色の甜心
    2020-12-04 11:29

    You can do it in .xib file. Just edit it as text and set constant="0.5" instead of "1" in your view height constraint

    
    
    
    

    In Interface Builder

提交回复
热议问题