added another test property useScaledLineHeight

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-07-22 12:14:52 -05:00
parent d00b1d0a0e
commit 090a65e998
3 changed files with 10 additions and 4 deletions

View File

@ -1163,7 +1163,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 32;
CURRENT_PROJECT_VERSION = 33;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1200,7 +1200,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 32;
CURRENT_PROJECT_VERSION = 33;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;

View File

@ -21,6 +21,7 @@ extension NSAttributedString {
extension NSMutableAttributedString {
public static var useMinimumLineHeight: Bool = true
public static var useScaledLineHeight: Bool = false
public static func mutableText(for text: String, textStyle: TextStyle, useScaledFont: Bool = true, textColor: UIColor, alignment: NSTextAlignment = .left, lineBreakMode: NSLineBreakMode) -> NSMutableAttributedString {
//var for if you can scale or not
@ -35,10 +36,12 @@ extension NSMutableAttributedString {
var lineHeight = textStyle.lineHeight
if scaledMode {
lineHeight = textStyle.scaledLineHeight
defaultFont = defaultFont.scaledFont
if useScaledLineHeight {
lineHeight = textStyle.scaledLineHeight
}
}
//set lineHeight
if textStyle.lineHeight > 0.0 {
if useMinimumLineHeight {

View File

@ -1,3 +1,6 @@
1.0.33
=======
-
1.0.32
=======
- Fixed bug dealing with Scaled