How to use TextEditor in SwiftUI | Bootcamp #36

preview_player
Показать описание
We will learn how to implement and customize a TextEditor() in SwiftUI. The Text Editor is a lot like the TextField (which we learned in the last video in the series), except that it allows for multi-line text input. With a TextEditor, we can allow our users to add multiple lines of text in iOS applications, which is perfect for features such as user profile bios!

🤙 WELCOME BACK 🤙

Рекомендации по теме
Комментарии
Автор

Love your series of swiftui videos!! 😊

ojtok
Автор

Good to see SwiftUI has grown up after 3 years! The TextEditor can customize both background and foreground fully

gccount
Автор

Just subscribed to your channel... your videos are so amazing, one of the best and most detailed SWIFTUI Channel on Youtube

damolaadekoya
Автор

your videos are so amazing, thank you!

JeckyKA
Автор

Thank you for making such great videos with clear explanations, your awesome!

ekkogaming
Автор

Big thanks for this video. Very useful!

vladimirmoor
Автор

I've been plowing through your Bootcamp videos, thank you so much for putting these together. Quick question with TextEditor(), can this be used in a Form{}? Seems to not be letting me change the placeholder text when inside a Form. Thanks again!!!

comexbackkid
Автор

Great as always! after some digging it seems like the TextEditor has some baggage from UIKit? which may be why you cannot set its background color directly. However if you put: init() = .clear} in the main view struct, say just above the state variables, then you can use .background(Color.x) as you normally would.

Stevesvideoshelf
Автор

hey nick, thanks for the video!!
My question is, what if I want to make a size variable text field, so that way it adjusts to all screen sizes of  devices?? I've tried many ways but i cant figure it out!! 🥺

guzmangonzalezrodrigo
Автор

Hello. How I can realize text field on iOS 13? :) Maybe it's possible with TextField?)

AlexandrTej
Автор

Hey, it is possible to save a TextEditor as itself? I mean not having to set another text = TextEditor. E.g. as on my iphone. When using the note function there and editing a new note, i can just swipe back to the overwiev of notes and the textEditor is safed.

vortex
Автор

how do you make the placeholder text disappear on tapping the text field.

rasheedandrew
Автор

I think TextEditor is not available in ios 13

yogeshbhatt
Автор

TextEditor(text: $textEditorText)
.frame(height: 250)

// we cannot change the background color of 'TextEditor' directly, first we have to hide the default background using this code, then apply background.
// To see this

.clipShape(.rect(cornerRadii: .init(topLeading: 10, bottomLeading: 10, bottomTrailing: 10, topTrailing: 10))) // cornerRadius is deprecated.

rayhaanalykhan