5.16-Stop and introduce business

Source: Internet
Author: User

LR came to me fitness, she said the students are certified, she worried, east to shun, Bao Ding mutton, big bowl eggplant

YY Show dinner selfie, too beautiful

Change products, exhibition study without this project, substitution, change demand, page big changes

Prepare to be a family doctor, a lot of pages, refueling, spelling, eye pain on the toilet rest, close eyes, wash your face,

I had to brush my teeth at night, and now I don't have any feet, nor how coding,

Q:scroll in IOS7 cannot scroll iOS9 can scroll

A: Add Constraints:

[Contentscrollview mas_makeconstraints:^ (Masconstraintmaker *make) {

Make.bottom.equalTo (Self.contentLabel.mas_bottom); Greaterthanorequalto added constraint to resolve bug that IOS7 cannot scroll

Make.height.mas_equalTo (contentLabelHeight-2);

}];

-----------------------------------------------------------------

Small blue dot can not be aligned with the label, the reason is lable is stretched, how to find, to label the red color, found that only one line of case, lable very high

The workaround is to figure out the height of the string and add a height constraint to the label

Reason: The picture is a size, label height can not open the picture, the picture in accordance with its own height display, label is pulled Big, when the label is enough, the picture can be open,

--------

------------------------------------------------------------------------------------

Call Initwithmodel First and then drop the viewdidload.

------------------------------------------------------------------------------------------------

The reason is that the height of the container view is set first

[Self.topwhiteview mas_makeconstraints:^ (Masconstraintmaker *make) {

Make.top.equalTo (Self.bgscrollview);

Make.left.right.equalTo (Self.view);

Make.height.mas_equalTo (200); Highly adaptive test

}];

The bottom constraint is added later

[Self.topwhiteview mas_makeconstraints:^ (Masconstraintmaker *make) {

Make.bottom.mas_equalTo (Self.labelbuttonview). Offset (khdfverticalmargin);

}];

, in fact the constraint conflict, the console agreed to the constraint error message:

Try this:

(1) Look at each constraint and try to figure out which you don ' t expect;

(2) Find the code that added the unwanted constraint or constraints and fix it.

(

"<maslayoutconstraint:0x7b7a16e0 uiview:0x79eda150.height = = 200>",

"<maslayoutconstraint:0x7b788250 Uilabel:0x79eda370.top = = Uiview:0x79eda150.top + 20>",

"<maslayoutconstraint:0x79ec8b50 uilabel:0x79eda370.height = = 16.707>",

"<maslayoutconstraint:0x7b7d1850 Uilabel:0x7b7af810.top = = Uilabel:0x79eda370.bottom + 8>",

"<maslayoutconstraint:0x7b74dbb0 uilabel:0x7b7af810.height = = 16.707>",

"<maslayoutconstraint:0x7b7c5560 Uilabel:0x7b7d31e0.top = = Uilabel:0x7b7af810.bottom + 10>",

"<maslayoutconstraint:0x7b7d10e0 uilabel:0x7b75ea10.height = = 16.707>",

How to debug, add a lot of downtime data, found not open view, guess is the height of the view is written dead, really

-------

ScrollView cannot scroll

You do not have to set the contentsize, a purely constrained line custom Bottom view also sets the constraint:

[Self mas_makeconstraints:^ (Masconstraintmaker *make) {

Make.bottom.equalTo (Commentview);

}];

[Self.bgscrollview mas_makeconstraints:^ (Masconstraintmaker *make) {

Make.bottom.mas_equalTo (Self.bottomtotravelview); Constraints of ScrollView

}];

ScrollView Initial constraints:

[_bgscrollview mas_makeconstraints:^ (Masconstraintmaker *make) {

Make.edges.equalTo (Self.view);

}];

----------

Object is nil and cannot be constrained

5.16-Stop and introduce business

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.