Objective-c - Two tableviews. The right one will be blocked without adding top64, but the left one will not. Question: Why?
滿天的星座
滿天的星座 2017-05-02 09:23:45
0
1
607

I want to make one with these two columns , I use two tableviews, so here comes the problem. When I used Swift, I used SB drag and drop. I encountered this situation. At that time, I also added the above 64 padding to the tableview on the right. This time I used Written in object-c code , I still encountered this problem. If the right tabvilew does not add a height of 64, it will be blocked by the navigation. So why is the left side not blocked? I am surprised

The picture below does not add 64

[leftTable mas_makeConstraints : ^(MASConstraintMaker *make) {

    make.left.equalTo(self.view.mas_left).offset(0);
    make.bottom.equalTo(self.view.mas_bottom).offset(-0);
    make.right.equalTo(rightTable.mas_left);
    make.width.equalTo(@100);
    make.height.equalTo(@(bound.size.height));
}];



[rightTable mas_makeConstraints : ^(MASConstraintMaker *make) {
    make.left.equalTo(leftTable.mas_right).with.offset(100);
    make.height.equalTo(@(bound.size.height));
    make.right.equalTo(self.view.mas_right);
    make.top.equalTo(self.view.mas_top).offset(64); 这个64如果改为0  就是第2张图的效果,为什么呢?左侧为什么就不挡住呢?
    make.bottom.equalTo(self.view.mas_bottom);
}];
滿天的星座
滿天的星座

reply all(1)
Peter_Zhu

In SB, automatic adjustment is only effective for the first View. You can adjust the order of subviews to see if it has changed

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template