上一页 1 2 3 4 5 6 7 8 ··· 19 下一页
摘要: http://stackoverflow.com/questions/446405/adjust-uilabel-height-depending-on-the-text根据内容动态设置UILabel高度 阅读全文
posted @ 2013-10-17 13:00 时光独白 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://blog.csdn.net/likendsl/article/details/7566305我们做iOS程序开发时经常用遇到EXC_BAD_ACCESS错误导致Crash,出现这种错误时一般Xcode不会给我们太多的信息来定位错误来源,只是在应用Delegate上留下像Thread 1: Program received signal:"EXC_BAD_ACCESS",让问题无从找起。比如你对已释放的对象发送消息时就会出现,EXC_BAD_ACCESS,再如release的对象再release,release那些autorelease的对象等也会报这 阅读全文
posted @ 2013-10-17 10:07 时光独白 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://www.cnblogs.com/ygm900/p/3154747.html有没有遇到过,导航+UITableView,在push,back回来之后,当前cell仍然是选中的状态。当然,解决办法简单,添加一句[tableView deselectRowAtIndexPath:indexPath animated:YES]即可。令人纠结的时,在没加这句的时候,有的视图同样回来之后,选中状态消失,为什么会出现这种情况呢?原来是,如果UITableView是在UITableViewController中时,就会默然取消,而如果是在UIViewController时,需要添加这一 阅读全文
posted @ 2013-10-17 09:01 时光独白 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 原文地址: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) 编辑
摘要: NSURL*url = [NSURLURLWithString:@“http.....”]; UIImage*image = [UIImageimageWithData:[NSDatadataWithContentsOfURL:url]]; uiimage.image= image; 阅读全文
posted @ 2013-10-15 16:23 时光独白 阅读(339) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 19 下一页