标签:c style class blog code java
//1.根据icon计算name的长度 CGFloat nameX = CGRectGetMaxX(_icon.frame) + kBorder; CGFloat nameY = iconY; //计算用户昵称的长度 CGSize nameSize = [_weiBo.name sizeWithFont:_name.font]; _name.frame = CGRectMake(nameX, nameY, nameSize.width, nameSize.height); //2.设置vip的frame CGFloat vipX = CGRectGetMaxX(_name.frame) + kBorder; CGFloat vipY = nameY; _vip.frame = CGRectMake(vipX, vipY, 10, 10);
根据ui控件的字体计算占用的长度,布布扣,bubuko.com
标签:c style class blog code java
原文地址:http://www.cnblogs.com/hw140430/p/3774884.html