Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swiftui textfield multiline

//You can use the .multiLineTextAlignment modifier

TextField("Random text", text: $text)
	.multiLineTextAlignment(.leading)

//This aligns the text to the left
//There are more propeties besides .leading, more can be found at the source
Source by developer.apple.com #
 
PREVIOUS NEXT
Tagged: #swiftui #textfield #multiline
ADD COMMENT
Topic
Name
5+9 =