![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
布局
sanjieshenwu1987
这个作者很懒,什么都没留下…
展开
-
iOS UITableViewCell 高度自适应的解决方案
// 设置预加载cell高度 tableView.estimatedRowHeight = 55; // 自动适应cell高度 tableView.rowHeight = UITableViewAutomaticDimension; 或者 - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath { return 55; } - (C.原创 2020-06-23 09:16:51 · 4834 阅读 · 2 评论 -
获取view的坐标最大值
在布局的时候,想要在view的左边或下边布置另一个view,可以使用CGRectGetMaxX和CGRectGetMaxY来获取第一个view的坐标,来布局另一个view的origin(原点) UIView *view = [[UIView alloc] init]; [self.view addSubview:view]; [view mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(se原创 2020-06-22 16:59:05 · 1087 阅读 · 0 评论