Texts
Monday Hero can automatically understand the texts, and convert design to Swift/Kotlin code.

Automatically Detected Texts
Custom Texts

Last updated
Monday Hero can automatically understand the texts, and convert design to Swift/Kotlin code.


Last updated
//Signup Page, Welcome Label
import UIKit
class SignUpViewController: UIViewController {
// MARK: - Properties
@IBOutlet private weak var welcomeLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
setupViews()
setupLayout()
}
}
extension SignUpViewController {
private func setupViews() {
welcomeLabel.textColor = UIColor.black
welcomeLabel.numberOfLines = 0
welcomeLabel.font = UIFont.textStyle7
welcomeLabel.textAlignment = .center
welcomeLabel.text = NSLocalizedString("welcome.to.travel.app", comment: "")
}
private func setupLayout() {
//Constraints are defined in Storyboard file.
}
}<!--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>//HeaderLabel.swift
import UIKit
class HeaderLabel: UILabel {
// MARK: - Initializers
override init(frame: CGRect) {
super.init(frame: frame)
initialize()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
initialize()
}
func initialize() {
applyDefaultStyle()
}
// MARK: - Styling
func applyDefaultStyle() {
self.textColor = UIColor.pebble
self.numberOfLines = 0
self.font = UIFont.textStyle18
self.textAlignment = .left
}
func set(text: String){
self.text = text
}
}import UIKit
class SignupPage: UIViewController {
// MARK: - Properties
@IBOutlet private weak var welcomeLabel: HeaderLabel!
override func viewDidLoad() {
super.viewDidLoad()
setupViews()
setupLayout()
}
}
extension SignupPage {
private func setupViews() {
welcomeLabel.set(text: NSLocalizedString("welcome.to.travel.app", comment: ""))
}
private func setupLayout() {
//Constraints are defined in Storyboard file.
}
}