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

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -