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
expkzb
V2EX  ›  iDev

对于 iOS 应用来说,你倾向于用哪种方式控制样式

  •  
  •   expkzb · Aug 7, 2015 · 3500 views
    This topic created in 4115 days ago, the information mentioned may be changed or developed.

    一、宏

    类似于:

    #define FontTypeSmallTitle [UIFont fontWithName:@"Arial" size:14]
    

    二、继承

    类似于:

    @interface TypeALabel : UILabel
    

    三、使用类似 css 样式表写法的类库

    欢迎补充

    13 replies  •  2015-10-04 11:09:53 +08:00
    pengjay
    pengjay
    Aug 7, 2015❤️1
    1
    Category
    vulgur
    vulgur
    Aug 7, 2015❤️1
    2
    继承
    SeanChense
    SeanChense
    Aug 7, 2015 via iPhone❤️1
    3
    像 font 、color 这样的直接 Category
    tigerZhang
    tigerZhang
    Aug 7, 2015
    4
    Category
    xi_lin
    xi_lin
    Aug 7, 2015
    5
    @SeanChense 怎么用Category做呢?
    hdbean
    hdbean
    Aug 8, 2015
    6
    分类
    SeanChense
    SeanChense
    Aug 8, 2015 via iPhone
    7
    @xi_lin http://seanchense.github.io/blog/use_category_in_ios_project.html 我写的一点说明,如有漏洞请见谅。
    LINAICAI
    LINAICAI
    Aug 8, 2015
    8
    绝对Category好用。。。
    xi_lin
    xi_lin
    Aug 8, 2015 via iPhone
    9
    @SeanChense 懂了,理解叉了~谢谢分享
    fhefh
    fhefh
    Aug 8, 2015
    10
    学习了 谢谢
    likers
    likers
    Aug 12, 2015
    11
    @SeanChense 可以理解为是重载UIColor吗
    SeanChense
    SeanChense
    Aug 12, 2015
    12
    @likers Category 不能算重载因为不是继承。
    likers
    likers
    Oct 4, 2015
    13
    @SeanChense 了解了,谢谢!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4895 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 02:23 · PVG 10:23 · LAX 18:23 · JFK 21:23
    ♥ Do have faith in what you're doing.