What is equivalent to Android TextView in iOS?

When I searched for the “Android TextView equivalent in iOS” on Google and StackOverflow, I expected to find a quick answer, but it took a little search and keyword switching. I am sending this Q&A pair so that other people can quickly respond to these keywords.

I have been programming on Android for about a year, and now I'm starting work on iOS. All the tutorials that I used use UILabel to display text, but I want multiline text to be paragraph long, and UILabel is not suitable for this.

This one appeared, but it was the wrong direction (iOS for Android):

iOS for Android: how to display a TextView

And here are some other "equivalent" questions, but not the one I wanted:

+1
source share
1 answer

The equivalent of Android TextView in iOS is UILabel and UITextView . The one you want for large volumes of text is a UITextView . The following are descriptions taken from the documentation:

UITextView

The UITextView class implements behavior for a scrollable, multi-line region of text. The class supports displaying text using a custom style of information, and also supports text editing. You usually use a text view to display multiple lines of text, for example, when displaying the body of a large text document.

Uilabel

The UILabel class implements a read-only text representation. You can use this class to draw one or more lines of static text, for example, those that you can use to identify other parts of your user interface.

UITextField

A UITextField object is a control that displays editable text and sends an action message to the target when the user presses the return button. You typically use this class to collect small amounts of text from the user and perform some immediate actions, such as searching based on that text.

Here are some links for further research:

+2
source

Source: https://habr.com/ru/post/1258424/


All Articles