0
単純なUIView
行を作成してからその上に円を作成しようとしています。しかし、私はどのように階層の問題を作らずにサークルを描くと思いますか?これまでのところ、私はライン円が重複しているビューを作成する
ライン
self.stepLine = UIView()
self.stepLine.translatesAutoresizingMaskIntoConstraints = false
stepView.addSubview(self.stepLine)
self.stepLine.backgroundColor = Color.theme.value
self.stepLine.bottomAnchor.constraint(equalTo: stepView.bottomAnchor, constant: -4).isActive = true
self.stepLine.heightAnchor.constraint(equalToConstant: 6).isActive = true
self.stepLine.leftAnchor.constraint(equalTo: stepView.leftAnchor).isActive = true
override func layoutSubviews() {
self.stepLine.widthAnchor.constraint(equalToConstant: self.frame.width/2).isActive = true
}
イラスト
"私はシンプルなUIViewラインを作成しようとしています。どこに描く? –
「階層の問題」とは何を意味しますか? – Paulw11