Apply getter check to determine if API is exposed as property or as method for iOS backward compatibility

This commit is contained in:
Panayot Cankov
2016-09-12 12:54:38 +03:00
parent e9c7c5a749
commit b81c034f67
29 changed files with 174 additions and 113 deletions

View File

@@ -2,6 +2,8 @@ import spanCommon = require("./span-common");
import enums = require("ui/enums");
import formattedString = require("text/formatted-string");
import * as utils from "utils/utils";
global.moduleMerge(spanCommon, exports);
export class Span extends spanCommon.Span {
@@ -16,7 +18,7 @@ export class Span extends spanCommon.Span {
if (realFontAttributes || realFontFamily || realFontSize) {
var font;
if (!realFontSize) {
realFontSize = UIFont.systemFontSize();
realFontSize = utils.ios.getter(UIFont, UIFont.systemFontSize);
}
if (realFontFamily) {
font = UIFont.fontWithNameSize(realFontFamily, realFontSize);