+ (APCCustomBackButton *)customBackButtonWithTarget:(id)aTarget action:(SEL)anAction tintColor:(UIColor *)aTintColor

{

APCCustomBackButton  *button = [APCCustomBackButton buttonWithType:UIButtonTypeCustom];

CGRect  frame = CGRectMake(0.0, 0.0, kButtonWidth, kButtonHeight);

button.frame = frame;

[button addTarget:aTarget action:anAction forControlEvents:UIControlEventTouchUpInside];

CGMutablePathRef  path = CGPathCreateMutable();

CGPoint  p0 = CGPointMake(13.0, 12.0);

CGPathMoveToPoint(path, NULL, p0.x, p0.y);

CGPoint  p1 = CGPointMake(2.0, 22.0);

CGPathAddLineToPoint(path, NULL, p1.x, p1.y);

CGPoint  p2 = CGPointMake(13.0, 32.0);

CGPathAddLineToPoint(path, NULL, p2.x, p2.y);

CALayer  *layer = button.layer;

CAShapeLayer  *shaper = [[CAShapeLayer alloc] init];

shaper.frame = CGRectMake(0.0, 0.0, kLayerWidth, kLayerHeight);

shaper.bounds = CGRectMake(0.0, 0.0, kLayerWidth, kLayerHeight);

shaper.path = path;

shaper.lineWidth = kArrowLineWeight;

shaper.fillColor = [[UIColor clearColor] CGColor];

shaper.contentsScale = [[UIScreen mainScreen] scale];

shaper.strokeColor = aTintColor.CGColor;

[layer addSublayer:shaper];

CGPathRelease(path);

return  button;

}

最新文章

  1. Java之工厂方法
  2. struts2使用Convention Plugin在weblogic上以war包部署时,找不到Action的解决办法
  3. ACM/ICPC 之 Kruskal范例(ZOJ1203-POJ1861(ZOJ1542))
  4. Atitit.为什么小公司也要做高大上开源项目
  5. uva133-S.B.S.
  6. 【Reporting Services 报表开发】— 矩阵的使用
  7. DataGridView显示行号的几种方法来自http://www.soaspx.com/dotnet/csharp/csharp_20100204_2740.html
  8. Asp.Net 之 调用分享接口
  9. Config
  10. (?m)使用实例
  11. Android拖动和缩放图片
  12. web 直播&即时聊天------阿里云、融云(三)
  13. Entity framework 中Where、First、Count等查询函数使用时要注意
  14. 《15个提高Google搜索的技巧》
  15. MongoDB下,启动服务时,出现“服务没有响应控制功能”解决方法
  16. 让终端走socks5代理
  17. 爬虫——request
  18. javamail邮件Multipart支持同时发text和html混合消息,alternative纯文本与超文本共存
  19. Mac svn使用学习-2-服务端
  20. Online Judge 2014 K-th Number -主席树

热门文章

  1. Sense2vec with spaCy and Gensim
  2. 1.js 模拟a标签打开新网页
  3. windows下mysql5.1忘记root密码解决方法[win7]
  4. Httpclient入门代码
  5. UVaLive 6847 Zeroes (找规律,水题)
  6. sublime入门文章
  7. js函数和变量的执行顺序【易错】
  8. JavaScript之——对象Object(一)
  9. laravel 数据库连接Mysql
  10. 解决DDOS攻击生产案例