You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 17, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: Sources/ObjCSupport/LOKLabelLayout.swift
+72Lines changed: 72 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,11 +13,13 @@ import UIKit
13
13
@objcpublicletstring:String?
14
14
@objcpublicletlineHeight:CGFloat
15
15
@objcpublicletfont:UIFont
16
+
@objcpublicletlineBreakMode:NSLineBreakMode?
16
17
@objcpublicletnumberOfLines:Int
17
18
@objcpublicletalignment:LOKAlignment
18
19
@objcpublicletviewClass:UILabel.Type
19
20
@objcpublicletconfigure:((UILabel)->Void)?
20
21
22
+
// TODO: Remove this init once all consumers are switch to `init(attributedString:font:lineBreakMode:lineHeight:numberOfLines:alignment:flexibility:viewReuseId:viewClass:configure:)`
self.font = font ??UIFont.systemFont(ofSize:UIFont.systemFontSize)
34
+
self.lineBreakMode =nil
32
35
self.lineHeight = lineHeight
33
36
self.numberOfLines = numberOfLines
34
37
self.alignment = alignment ??.topLeading
@@ -49,6 +52,7 @@ import UIKit
49
52
super.init(layout: layout)
50
53
}
51
54
55
+
// TODO: Remove this init once all consumers are switch to `init(string:font:lineBreakMode:lineHeight:numberOfLines:alignment:flexibility:viewReuseId:viewClass:configure:)`
52
56
@objcpublicinit(string:String,
53
57
font:UIFont?,
54
58
lineHeight:CGFloat,
@@ -60,6 +64,7 @@ import UIKit
60
64
configure:((UILabel)->Void)?){
61
65
self.string = string
62
66
self.font = font ??UIFont.systemFont(ofSize:UIFont.systemFontSize)
0 commit comments