Text Area

Convert TextView/Text component to iOS/Android code.

Text View allows the user to enter more than one line of text. A textView image is and its code is shown below.

While creating the component, Monday Hero automatically detects the text and Background in the TextView.

Generated iOS/Android Code of TextView

//HomePageViewController.swift 
import UIKit

class HomePageViewController: UIViewController {

//Connection from an Interface Builder to a UI component
@IBOutlet private weak var addNotesTextView: UITextView!

	override func viewDidLoad() {
		super.viewDidLoad()
		setupViews()
	}
}

extension HomePageViewController {
	private func setupViews() {
		//TextView properties
		addNotesTextView.backgroundColor = UIColor.daisy2
		addNotesTextView.text = NSLocalizedString("add.note.here", comment: "")
		addNotesTextView.textColor = UIColor.spruce_40
		addNotesTextView.font = UIFont.textStyle5
		addNotesTextView.textAlignment = .left
			}
}		

Last updated