03 2012 档案

摘要:隔行换色 UIView *view=[[UIViewalloc]initWithFrame:cell.frame]; if (indexPath.row % 2==0) { view.backgroundColor=[UIColor blueColor]; } else { view.backgroundColor=[UIColorwhiteColor]; } cell.backgroundView=view;关于选中背景色的显示以及返回正常色有两张实现方式1 .h 基于UIviewControl UIView *bgsele_view=[[UIView alloc]in... 阅读全文
posted @ 2012-03-30 16:03 Dzs 阅读(1145) 评论(1) 推荐(0) 编辑
摘要:开发过程中,遇到了setvalue 与setobject 俩函数,也不知道具体的区别是啥做了几个小测试,发现setValue可以存nil值,而setObject会报错。如果没有该dictonary中没有该key会自动创建 ,如果存在,自然覆盖掉 阅读全文
posted @ 2012-03-26 17:03 Dzs 阅读(1336) 评论(0) 推荐(0) 编辑
摘要:在实际的应用中,总感觉圆角的东西比较好看, 像button,label,image等等,以前的时候我就经常给那些控件添加一个UIImageView作为背景,再搞张圆角的图片,不过今天发现了新方法看代码viewT.layer.cornerRadius = 10;//设置那个圆角的有多圆viewT.layer.borderWidth = 10;//设置边框的宽度,当然可以不要viewT.layer.borderColor = [[UIColor redColor] CGColor];//设置边框的颜色viewT.layer.masksToBounds = YES;//设为NO去试试其实的viewT 阅读全文
posted @ 2012-03-23 16:58 Dzs 阅读(1416) 评论(0) 推荐(0) 编辑
摘要:加粗loginLabel.font= [UIFontfontWithName:@"Helvetica-Bold"size:20];加粗并且倾斜loginLabel.font= [UIFontfontWithName:@"Helvetica-BoldOblique"size:20]; 阅读全文
posted @ 2012-03-22 10:54 Dzs 阅读(964) 评论(0) 推荐(0) 编辑
摘要:2012-03-22UIImageView *imgvPhoto= [UIImageView alloc] init];//添加边框 CALayer *layer = [_imgvPhoto layer];layer.borderColor = [[UIColor whiteColor] CGColor];layer.borderWidth = 5.0f;//添加四个边阴影_imgvPhoto.layer.shadowColor = [UIColor blackColor].CGColor;_imgvPhoto.layer.shadowOffset = CGSizeMake(0, 0);_im 阅读全文
posted @ 2012-03-22 10:50 Dzs 阅读(1019) 评论(0) 推荐(1) 编辑
摘要:在presentModalViewController的时候自己创建一个navigationController,这样ViewController的navigationController属性不为nil,即可使用pushViewController。POIListViewController* poiListVC =[[POIListViewController alloc] initWithNibName:@"POIListViewController" bundle:nil];poiListVC.poisArray =self.searchResult;poiListV 阅读全文
posted @ 2012-03-20 14:55 Dzs 阅读(621) 评论(0) 推荐(0) 编辑
摘要:2012-03-21CAAnimation动画duration :持续间隔数repeatCount:重复次数layer.opacity:透明度好多东西没弄明白 阅读全文
posted @ 2012-03-20 14:50 Dzs 阅读(239) 评论(0) 推荐(0) 编辑