Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add tiscrollview #285

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Feature/add tiscrollview #285

wants to merge 7 commits into from

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.

3 participants