interfacebuilder와 Auto layout으로 1px의 선을 낸다
우선 결과에서

요구되고 있는 것은 0.5의 선.
지금 이해가 달콤합니다만 Autolayout에서 Height=1을 설정해도 2px 정도가 되는 것 같습니다.
새로 설정하는 경우
우선 사쿠토 뷰를 배치

그리고 Autolayout 설정에서 Height에 .5를 입력하십시오.

여기까지는 OK.
중간부터 설정하는 경우
그러나 위의 Height 0.5, 첫회에 걸쳐 줄 수는 있는 것 같습니다만,

이쪽의 Size Inspector에서는 설정할 수 없는 모양・・・・
조금 신규로 다시 하는 것도・・・라고 하는 때는, 아래와 같은 방법도 있는 것 같습니다.
이런 식으로 constraint와 outlet을 묶어

class ViewController: UIViewController {
// constraint outlet
@IBOutlet weak var heightConstraint: NSLayoutConstraint!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
heightConstraint.constant = 0.5
}
}
이런 상태로 constraint를 변경해 주는 것도 가능한 것 같습니다.
Reference
이 문제에 관하여(interfacebuilder와 Auto layout으로 1px의 선을 낸다), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/terrierscript/items/211507c2a1a8baf407cb텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)