diff --git a/utils/utils.ios.ts b/utils/utils.ios.ts index eba9c41ce..7091f0be5 100644 --- a/utils/utils.ios.ts +++ b/utils/utils.ios.ts @@ -68,36 +68,35 @@ export module ios { for (let i = 0; i < v.formattedText.spans.length; i++) { let span = v.formattedText.spans.getItem(i); span.text = getTransformedText(v, span.text, transform); - console.log("HERE: " + span.text); } } else { let source = v.text; - let attributes = NSMutableArray.array(); + let attributes = new Array(); let range = { location: 0, length: source.length }; var decorationValues = (decoration + "").split(" "); if (decorationValues.indexOf(enums.TextDecoration.none) === -1) { - let dict = NSMutableDictionary.new(); + let dict = new Map(); if (decorationValues.indexOf(enums.TextDecoration.underline) !== -1) { - dict.setValueForKey(NSUnderlineStyle.NSUnderlineStyleSingle, NSUnderlineStyleAttributeName); + dict.set(NSUnderlineStyleAttributeName, NSUnderlineStyle.NSUnderlineStyleSingle); } if (decorationValues.indexOf(enums.TextDecoration.lineThrough) !== -1) { - dict.setValueForKey(NSUnderlineStyle.NSUnderlineStyleSingle, NSStrikethroughStyleAttributeName); + dict.set(NSStrikethroughStyleAttributeName, NSUnderlineStyle.NSUnderlineStyleSingle); } - attributes.addObject({ attrs: dict, range: NSValue.valueWithRange(range) }); + attributes.push({ attrs: dict, range: NSValue.valueWithRange(range) }); } let view: dts.ios.TextUIView | UIButton = v._nativeView; source = getTransformedText(v, source, transform); - if (attributes.count > 0) { + if (attributes.length > 0) { let result = NSMutableAttributedString.alloc().initWithString(source); - for (let i = 0; i < attributes.count; i++) { + for (let i = 0; i < attributes.length; i++) { result.setAttributesRange(attributes[i]["attrs"], attributes[i]["range"].rangeValue); }