Attributed text, replace a specific font by another using swift -
i'm using attributed text in uitextview. text contain many fonts. i'm looking way replace particular font one. any swift approach this? :) my code in objective-c, since use both cocoatouch, should same logic. the method use enumerateattribute:inrange:options:usingblock: nsfontattributename . there point isn't discussed: how recognize font 1 searched. looking familyname , fontname (property of uifont ? in same family, font may lot different , may want search 1 matching same name. i've discussed once font names here . may found interesting in case. note there methods (that didn't know @ time) can bold name of font if available (or italic, etc.) the main code in objective-c one: [attrstring enumerateattribute:nsfontattributename inrange:nsmakerange(0, [attrstring length]) options:0 usingblock:^(id value, nsrange range, bool *stop) { uifo...