我正在尝试创建一个简单的UIView
行,然后在它上面创建一个圆圈。但是,我不确定我是如何在不产生等级问题的情况下绘制圆圈的?到目前为止我在下面,jut创建了行
订单
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
}
插图
答案 0 :(得分:0)
MainPage::MainPage()
{
InitializeComponent();
auto vec = ref new Platform::Collections::Vector<StudentWrapper^>();
vec->Append(ref new StudentWrapper(Student(L"Alice")));
vec->Append(ref new StudentWrapper(Student(L"Bob")));
vec->Append(ref new StudentWrapper(Student(L"Chris")));
students->ItemsSource = vec;
}
或其一些变化。但考虑到您所呈现的代码的性质,这是我建议的一般概念。