April 2020
Beginner
316 pages
8h 20m
English
Now that we've got the basics up and running, we'll take a closer look at our TextView in TextHelper.swift. You'll see a very similar pattern to what we had previously but with some added extras – don't worry about these; we'll go through them very shortly. For now, let's start by taking a closer look at our makeUIView() function. Notice that we've got a lot more going on in there than our previous example:
func makeUIView(context: Context) -> UITextView { let textView = UITextView() textView.delegate = context.coordinator textView.font = UIFont.preferredFont(forTextStyle: .body) textView.isScrollEnabled = true textView.isEditable = true textView.isUserInteractionEnabled = true return textView ...Read now
Unlock full access