摘要: 原文地址:http://blog.sina.com.cn/s/blog_76f3236b01013zmk.html1、CGRectInsetCGRect CGRectInset (CGRect rect,CGFloat dx,CGFloat dy);该结构体的应用是以原rect为中心,再参考dx,dy,进行缩放或者放大。图中的每一个矩形都是以上一个矩形作为参考矩形。所以下一矩形(比如黄色矩形对绿色矩形来说是下一个矩形)都比上一个矩形要小。具体小多少都是要参照dx和dy来判定的。2、CGRectOffsetCGRect CGRectOffset(CGRect rect,CGFloat dx,CG 阅读全文
posted @ 2013-10-16 17:29 时光独白 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 通过设置行高,确定上下间距- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath设置frame,通过坐标设置左右间距[pic setFrame:CGRectMake(230, 0, 73, 53)]; 阅读全文
posted @ 2013-10-16 17:27 时光独白 阅读(360) 评论(0) 推荐(0) 编辑
摘要: http://www.cocoachina.com/bbs/simple/?t31769.htmlUITableViewCell *cell = [self tableView:tableView cellForRowAtIndexPath:indexPath]; UILabel *tempLable=(UILabel *)[cell viewWithTag:1]; UIImageView *tempImage=(UIImageView *)[cell viewWithTag:2]; CGFloat lableHeight=tempLable.frame.size.heigh... 阅读全文
posted @ 2013-10-16 17:06 时光独白 阅读(159) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/11847515/set-uiimageview-size-in-uitableviewcell-when-uiimage-loaded-from-url 阅读全文
posted @ 2013-10-16 16:54 时光独白 阅读(126) 评论(0) 推荐(0) 编辑
摘要: UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(10, 100, 300, 180)]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 100, 300, 150)]; label.text = @"where are you? where are you? where are you? where are you? where are you? where are you? where are you? where a... 阅读全文
posted @ 2013-10-16 16:31 时光独白 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://blog.csdn.net/enuola/article/details/8559588在大多属性情况下,给UILabel进行动态数据绑定的时候,往往需要根据字符串的多少,动态调整UILabel的宽度或高度。下面分两种情况考虑:1、UILabel宽度不变,根据字体多少,自动调整UILabel的高度,并折行显示。代码如下:[cpp]view plaincopyUILabel*label=[[UILabelalloc]initWithFrame:CGRectMake(0,10,200,20)];label.font=[UIFontboldSystemFontOfSize:2 阅读全文
posted @ 2013-10-16 16:19 时光独白 阅读(206) 评论(0) 推荐(0) 编辑