Skip to content

Conversation

@svshkv
Copy link

@svshkv svshkv commented Nov 1, 2021

Позволяет скролить текст, если его размер больше чем размер вью. Также если размер текста будет меньше, чем размер вью, то текст будет отображаться в центре.

Зачем это надо и почему не использовать textview?
textview не умеет выравнивать по вертикали

Снимок экрана 2021-11-02 в 00 07 22

tiscrolllabel.mov

Comment on lines 32 to 36
public var text: String = "" {
didSet {
textLabel.text = text
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ещё attributedText надо добавить

Comment on lines 26 to 28
open class TIScrollLabel: BaseInitializableView {

private let labeledScrollView = LabeledScrollView()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а зачем нам оборачивать LabeledScrollView в ещё одну view?

label.text = // установка текста
label.font = // установка шрифта
label.textColor = // установка цвета текста
label.textAligment = // установка расположения текста
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

textAlig_n_ment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants