swiftui line break text
Text("This is the first line\nThis is the second")
swiftui line break text
Text("This is the first line\nThis is the second")
next line swift
//I'll try to explain how to make new lines as many ways as possible
//Since you might not have defined in what context do you want the new line to be in
//In native swift context
//You could use \n or \r\n
print("Hello \n world!")
var sentence = "One word \n another word"
print(sentence)
//Or you can use triple quotation """ (text) """
print(""" Multi Lines
Are fun this way""")
//In UIKit context
//If you wish to edit it from the attributes tab:
//https://stackoverflow.com/questions/1121358/uilabel-wordwrap-text
//If you wish to edit it code-wise:
//https://www.hackingwithswift.com/articles/113/nsattributedstring-by-example
//This might help
//In SwiftUI Context
//You can add \n to create a line break
//Some examples:
Text("New \n Line \n after \n each \n word")
//Or use the triple quotation syntax """ (text) """
Text("""
New
Line
After
Every
Word
""")
//For TextField and TextEditors and such, it is best to use the multiLineTextAlignment modifier
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us