Merge pull request #6707 from NativeScript/release

This commit is contained in:
Svetoslav
2018-12-14 16:40:11 +02:00
committed by GitHub
85 changed files with 16109 additions and 535 deletions

View File

@@ -154,12 +154,15 @@ export class TextBase extends TextBaseCommon {
case "none":
break;
case "underline":
// TODO: Replace deprecated `StyleSingle` with `Single` after the next typings update
dict.set(NSUnderlineStyleAttributeName, NSUnderlineStyle.StyleSingle);
break;
case "line-through":
// TODO: Replace deprecated `StyleSingle` with `Single` after the next typings update
dict.set(NSStrikethroughStyleAttributeName, NSUnderlineStyle.StyleSingle);
break;
case "underline line-through":
// TODO: Replace deprecated `StyleSingle` with `Single` after the next typings update
dict.set(NSUnderlineStyleAttributeName, NSUnderlineStyle.StyleSingle);
dict.set(NSStrikethroughStyleAttributeName, NSUnderlineStyle.StyleSingle);
break;
@@ -196,7 +199,7 @@ export class TextBase extends TextBaseCommon {
// UITextView's font seems to change inside.
dict.set(NSFontAttributeName, this.nativeTextViewProtected.font);
}
const result = NSMutableAttributedString.alloc().initWithString(source);
result.setAttributesRange(<any>dict, { location: 0, length: source.length });
if (this.nativeTextViewProtected instanceof UIButton) {