xcode - "Right way" to add attributes to all numbers in NSMutableAttributedString -
xcode - "Right way" to add attributes to all numbers in NSMutableAttributedString -
is way add together attributes numbers in nsmutableattributedstring?
let reg: nsregularexpression = nsregularexpression(pattern: "\\d+", options: nil, error: nil)! reg.enumeratematchesinstring(str, options: nil, range: nsmakerange(0, str.length)) { (result, _, _) -> void in paragraph.addattribute(attributename, value: attributevalue, range: result.range) }
or maybe should done in other way? i'm totaly new xcode (comming "php world") want create sure i'm doing things in swift should.
xcode cocoa swift
Comments
Post a Comment