ios开发app - iOS开发使用Masonry布局如何让父视图的高度随着子视图的变化而变化?
高洛峰
高洛峰 2017-04-18 09:21:28
0
4
1242
高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(4)
洪涛
    [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(@0);
         make.bottom.equalTo(@0);
     }];
迷茫

Dynamicly calculate the string height when obtaining data, and set the parent control frame

Related methods: CGRect strRect = [str boundingRectWithSize:CGSizeMake(maxWidth, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont systemFontOfSize: fontSize]} context:nil];

迷茫

It’s okay if the height of the parent view is not given. The content will prop it up
Of course, if it is a cell, you need to calculate it yourself

阿神

The bottom of the bottom view is equal to the bottom of the parent view

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!