已经尝试了很多设置的UITextView auotolayout约束。但是当我跑步,我得到空白屏幕。我在UIButton中以相同的方式尝试,这工作!!!!!我如何设置自动布局约束的UITextView的
有没有被设置为UITextView的分配约束任何财产????
UITextView *text1;
text1=[[UITextView alloc]initWithFrame:CGRectMake(50, 100, 100, 30)];
[text1 setBackgroundColor:[UIColor blueColor]];
[email protected]"asjdgajsdbasbfbsdfbsdbfbsd";
[text1 sizeToFit];
set.translatesAutoresizingMaskIntoConstraints=NO;
[self.view addSubview:text1];
NSLayoutConstraint *constraint;
constraint = [NSLayoutConstraint constraintWithItem:text1 attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeBottom multiplier:1.0f constant:1.f];
[self.view addConstraint:constraint];
非常感谢。 。 。 。 。 –
完全没有。 。 。 。 – Bimawa