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
3 changes: 3 additions & 0 deletions Example/SplitflapExample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ class ViewController: UIViewController, SplitflapDataSource, SplitflapDelegate {
builder.textAlignment = .center
builder.textColor = .white
builder.lineColor = .darkGray

//Prefilled with false value, so could be ignored 👇
builder.adjustsFontSizeToFitWidth = false
}
}
}
9 changes: 8 additions & 1 deletion Sources/FlapViewBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@ public final class FlapViewBuilder {
id 1.0.
*/
public var flipPointHeightFactor: CGFloat = 1.0


/**
The on/off toggle for a label's property "adjustsFontSizeToFitWidth" inside every flap

By defaul the value is false, but it could be changed while initing a builder
*/
public var adjustsFontSizeToFitWidth: Bool = false

// MARK: - Initializing a Flap View

/**
Expand Down
1 change: 1 addition & 0 deletions Sources/TileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ final class TileView: UIView {
digitLabel.textAlignment = builder.textAlignment
digitLabel.textColor = builder.textColor
digitLabel.backgroundColor = builder.backgroundColor
digitLabel.adjustsFontSizeToFitWidth = builder.adjustsFontSizeToFitWidth
flipPointHeightFactor = builder.flipPointHeightFactor

addSubview(digitLabel)
Expand Down