Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Sources/Classes/SwipeMenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public struct SwipeMenuViewOptions {

/// ItemView selected textColor. Defaults to `.black`.
public var selectedTextColor: UIColor = UIColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0)

/// ItemView selected font. Defaults to `16 pt as bold SystemFont`.
public var selectedFont : UIFont = UIFont.boldSystemFont(ofSize: 16)

}

public struct AdditionView {
Expand Down
6 changes: 6 additions & 0 deletions Sources/Classes/TabItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import UIKit
final class TabItemView: UIView {

private(set) var titleLabel: UILabel = UILabel()
public var textFont : UIFont = UIFont.boldSystemFont(ofSize: 14)
public var selectedFont : UIFont = UIFont.boldSystemFont(ofSize: 16)

public var textColor: UIColor = UIColor(red: 140/255, green: 140/255, blue: 140/255, alpha: 1.0)
public var selectedTextColor: UIColor = .white
Expand All @@ -11,8 +13,12 @@ final class TabItemView: UIView {
didSet {
if isSelected {
titleLabel.textColor = selectedTextColor
titleLabel.font = selectedFont

} else {
titleLabel.textColor = textColor
titleLabel.font = textFont

}
}
}
Expand Down
6 changes: 5 additions & 1 deletion Sources/Classes/TabView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@ open class TabView: UIScrollView {
tabItemView.clipsToBounds = options.clipsToBounds
if let title = dataSource.tabView(self, titleForItemAt: index) {
tabItemView.titleLabel.text = title
tabItemView.titleLabel.font = options.itemView.font

tabItemView.textFont = options.itemView.font
tabItemView.selectedFont = options.itemView.selectedFont


tabItemView.textColor = options.itemView.textColor
tabItemView.selectedTextColor = options.itemView.selectedTextColor
}
Expand Down