V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
yfmir
V2EX  ›  iDev

如何画出完美的圆形?

  •  
  •   yfmir · 2015-06-26 18:04:15 +08:00 · 3725 次点击
    这是一个创建于 3228 天前的主题,其中的信息可能已经有所发展或是发生改变。
    用CAShapeLayer画圆,用strokenEnd来控制百分比,结果画出来的圆会出现不圆的情况

    10 条回复    2015-06-27 13:11:32 +08:00
    Imyssed
        1
    Imyssed  
       2015-06-26 18:14:29 +08:00
    Windows Paint
    不过你这问题问的奇怪。真正的圆形目前是画不出的,毕竟像素点。
    稍微标准的圆随便哪个画图软件都能画吧。○
    yfmir
        2
    yfmir  
    OP
       2015-06-26 18:19:35 +08:00
    @Imyssed 用代啊码亲
    haosxianr
        3
    haosxianr  
       2015-06-26 18:26:46 +08:00
    可以试一下这个,能满足你的需求,还能有动画效果: https://github.com/kirualex/KAProgressLabel
    yfmir
        4
    yfmir  
    OP
       2015-06-26 18:41:58 +08:00
    @haosxianr 好吧,看来得要用CG画了
    liushuaikobe
        5
    liushuaikobe  
       2015-06-26 19:06:29 +08:00
    参考下这个,一个KSProgressLabel的裁剪版本 https://github.com/liushuaikobe/LSKRoundedProgressView
    Imyssed
        6
    Imyssed  
       2015-06-26 19:57:53 +08:00
    shuax
        7
    shuax  
       2015-06-26 20:09:42 +08:00
    画一个2x的,再缩小
    huoshanhui
        8
    huoshanhui  
       2015-06-26 20:57:39 +08:00
    view.layer.cornerRadius = view.bounds.size.width / 2.0;
    sadaharu09
        9
    sadaharu09  
       2015-06-26 20:58:55 +08:00 via iPhone
    Ai可以转换为矢量图即可。
    c742435
        10
    c742435  
       2015-06-27 13:11:32 +08:00
    @shuax 顶你
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2948 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 14:06 · PVG 22:06 · LAX 07:06 · JFK 10:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.