qiuncheng
V2EX  ›  iOS

iOS 开发中处理 AttributedString 的优雅方式之一, CuteAttribute

  •  
  •   qiuncheng · Aug 27, 2017 · 2964 views
    This topic created in 3207 days ago, the information mentioned may be changed or developed.

    iOS 开发中优雅处理 AttributedString 的方式之一。
    周末空闲时间写了个方便处理 NSAtrributedString 的 framework,主要是使用链式来给 NSAtrributedString 添加属性,方便快捷。希望大佬们多多指教下。😁github 地址: https://github.com/qiuncheng/CuteAttribute

    2 replies    2017-08-27 20:25:10 +08:00
    cookiezby
        1
    cookiezby  
       Aug 27, 2017 via iPhone
    设置属性的函数可以添加 range 参数的话会好一些?默认的话是所有范围
    qiuncheng
        2
    qiuncheng  
    OP
       Aug 27, 2017
    @cookiezby 有设置 range 的参数。
    range(_ :) 和 ranges(_:) 两种方式。
    还有一些其他的便利方法。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3137 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 14:10 · PVG 22:10 · LAX 07:10 · JFK 10:10
    ♥ Do have faith in what you're doing.