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
Please initialize Fount in WormTabStripButton also , because if you don't initialize then font and size will not reflect first time
so i use -> self.font = AppTheme.TabStripFont()
class WormTabStripButton: UILabel{
var index:Int?
var paddingToEachSide:CGFloat = 10
var tabText:NSString?{
didSet{
let textSize:CGSize = tabText!.size(withAttributes: [NSAttributedStringKey.font: font])
self.frame.size.width = textSize.width + paddingToEachSide + paddingToEachSide
self.text = String(tabText!)
}
}
//MARK: init
override init(frame: CGRect) {
super.init(frame: frame)
self.font = AppTheme.TabStripFont()
}
convenience required init(key:String) {
self.init(frame:CGRect.zero)
self.font = AppTheme.TabStripFont()
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
The text was updated successfully, but these errors were encountered:
Please initialize Fount in WormTabStripButton also , because if you don't initialize then font and size will not reflect first time
so i use -> self.font = AppTheme.TabStripFont()
class WormTabStripButton: UILabel{
}
The text was updated successfully, but these errors were encountered: