2016年11月16日

论取任意图片上任意点的颜色值

摘要: 原来,我们可爱的产品汪有个需求,就是显示访客啊,或者企业头像啊,外圈呢默认不加边框,这样显得更文艺,头像和背景酷炫的图片完美融合,但是背景图都是浅色调,如果遇到用户头像是白色背景,或者室外蓝天白云的,就会模糊不清,分不清头像和背景图,然后就有了一个需求,取头像最外圈的色值,如果是浅色调,那给它加上浅 阅读全文

posted @ 2016-11-16 10:53 杨德明 阅读(676) 评论(0) 推荐(0) 编辑

2016年4月5日

发送短信,拨打电话,打开qq

摘要: 1.0 拨打电话 // 1,这种方法,打完电话后还会回到原来的程序,也会弹出提示,推荐这种 NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"13691427788"]; UIWebView * cal 阅读全文

posted @ 2016-04-05 10:59 杨德明 阅读(205) 评论(0) 推荐(0) 编辑

UIButton设置圆角和边框

摘要: 1.0 button 设置圆角和边框 UIButton*button = [[UIButtonalloc]init]; [button.titleLabel setFont:[UIFont systemFontOfSize:14]]; [button setTitleColor:RGBACOLOR( 阅读全文

posted @ 2016-04-05 10:58 杨德明 阅读(384) 评论(0) 推荐(0) 编辑

UITableView

摘要: UITableView * tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KScreen_width, KScreen_height) style:UITableViewStyleGrouped]; tableView 阅读全文

posted @ 2016-04-05 10:57 杨德明 阅读(154) 评论(0) 推荐(0) 编辑

NSDate NSDateFormatter

摘要: 1.0 获取系统时间和年月日 计算年龄 //获得系统时间 NSDate * senddate=[NSDate date]; NSDateFormatter *dateformatter=[[NSDateFormatter alloc] init]; [dateformatter setDateFor 阅读全文

posted @ 2016-04-05 10:56 杨德明 阅读(126) 评论(0) 推荐(0) 编辑

cocoaPods 更新替代指令

摘要: 最近使用CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动 原因在于当执行以上两个命令的时候会升级CocoaPods的spec仓库,加一个参数可以省略这一步,然后速度就会提升不少。加参数的命令如下: $ 阅读全文

posted @ 2016-04-05 10:55 杨德明 阅读(192) 评论(0) 推荐(0) 编辑

UISearchBar的使用

摘要: self.searchBar = [[UISearchBar alloc] init]; self.searchBar.barTintColor = BLUE_COLOR; 1.0 更改背景色 / 添加边框 / UIView *searView = [[self.searchBar.subviews 阅读全文

posted @ 2016-04-05 10:54 杨德明 阅读(218) 评论(0) 推荐(0) 编辑

导航