Texts
Monday Hero can automatically understand the texts, and convert design to Swift/Kotlin code.
Last updated
Monday Hero can automatically understand the texts, and convert design to Swift/Kotlin code.
Last updated
//HomePageViewController.swift
import UIKit
class HomePageViewController: UIViewController {
//Connection from an Interface Builder to a UI component
@IBOutlet private weak var simpleExampleLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
setupViews()
}
}
extension HomePageViewController {
private func setupViews() {
//Text properties
simpleExampleLabel.text = NSLocalizedString("simple.example", comment: "")
simpleExampleLabel.textColor = UIColor.black
simpleExampleLabel.numberOfLines = 0
simpleExampleLabel.font = UIFont.textStyle10
simpleExampleLabel.textAlignment = .center
}<!--activityExample.xml-->
<TextView
android:id="@+id/titleTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/title_text"
style="@style/textStyle13"
android:textAlignment="center"
android:textColor="?attr/black"
android:layout_marginStart="39dp"
android:layout_marginEnd="39dp"
android:layout_marginBottom="12dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mondayHeroLogoImageView"
app:layout_constraintBottom_toTopOf="@+id/descriptionTextView"/>
<!--strings.xml-->
<string name="title_text">"SimpleText"</string>
<string name="description_text">"This is a textView example and textViews are better while it kept short and legible."</string>