SwiftUI Multiline Textfield?

November 21, 2019 · 2 min read

This week I have been working on a personal macOS application that I use to generate the metadata that appears at the top of markdown files used by Gatsby when generating this very site.

I have a working version that I built with Swift and storyboards before the release of SwiftUI.

I thought it would be a great application to rebuild with SwiftUI to not only learn the new layout language and tools but to also update the application using Catalyst to work on my iPad as well.

Everything was going great until I hit what seemed like a simple problem to solve, a multiline textfield. After doing the Google for a while and reading through some of the usual sites and documentation it became apparent to me that this was going to be more of a problem than I first thought.

As of this post, I still have not found what seems like a simple solution. Either I am missing something really obvious, or there is no multiline textfield yet with SwiftUI?

I need to do more investigation to really find out for sure, but the only answer I have come across so far is to wrap a UITextField for use in SwiftUI. I really am hoping there is a simpler answer.

The work continues to an overlooked obvious control that a lot of applications will need and surely will slow adoption of SwiftUI at this time.

If you know the answer, please feel free to reach out and share it with me on either the contact form or @CompileSwift on Twitter, thanks.




Peter Witham
Peter Witham

Web and Mobile Software Maker, Photographer and Podcaster. I live and breath creativity.
I'd love for you to connect with me via Twitter or if you are a photo person like myself, Instagram.



Related Reads
Live Stream - macOS App Development

In this session I had one goal, refactor the blog post template keys out of the application code and...


December 09, 2019 · 1 min read

Related Reads
Patreon Video 4 in production

This week I focused on solving some of the layout problems with the master view we created in video ...


December 08, 2019 · 1 min read

Related Reads
Patreon Video 3 Master view layout using SwiftUI

This weekend I uploaded the next video in the series where I start building out the master list view...


December 01, 2019 · 1 min read

Related Reads
Podcast: Season 1 Episode 12

Use those Black Friday deals to improve your skills by getting resources to learn expand your unders...


November 28, 2019 · 1 min read

Related Reads
SwiftUI Multiline Textfield?

This week I have been working on a personal macOS application that I use to generate the metadata th...


November 21, 2019 · 2 min read

Related Reads
Podcast: Season 1 Episode 11

Source control is something everyone should be practicing. Maybe you know the term but not the reaso...


November 11, 2019 · 1 min read

Related Reads
First Serious SwiftUI Learning

This week I decided it was time to put macOS Catalina on one of my machines, the only reason I wante...


November 02, 2019 · 2 min read

Related Reads
Easy Way to Check for 32bit Apps on macOS

I have started to review my systems for macOS Catalina upgrades, that’s not to say I’m about to dive...


October 16, 2019 · 2 min read

Related Reads
Podcast: Season 1 Episode 10

I feel it is time for a discussion on the release cycle of Apple software, are they trying to meet i...


October 13, 2019 · 1 min read

Related Reads
Creating a Master Detail View with Navigation

The Problem You are creating an application using SwiftUI and need to have a master detail view with...


September 29, 2019 · 1 min read

Related Reads
Podcast: Season 1 Episode 9

Some thoughts about the new OS releases from Apple for the i devices. Plus, are you backing up that ...


September 25, 2019 · 1 min read

Related Reads
The Great Reworking Begins

With the now released iOS 13.0 and the pending release on Tuesday Sept. 24th 2019 of iPadOS 13.1 and...


September 23, 2019 · 2 min read

Related Reads
Podcast: Season 1 Episode 8

All the new hardware announcements from Apple. Apple Watch Series 5 7th Generation iPad iPhone 11 an...


September 10, 2019 · 1 min read

Related Reads
Podcast: Season 1 Episode 7

This week, Apple sent out invitations to the September event, as usual we expect it to be iPhones an...


September 02, 2019 · 1 min read

Related Reads
Using a UIPickerView as input for another control

The Problem You want to offer a pre-selected list of options to a user. This helps protect the conte...


August 30, 2019 · 1 min read

Related Reads
Podcast: Season 1 Episode 6

In this episode I talk about the state of the beta releases for the platforms and the developer tool...


August 25, 2019 · 1 min read

Related Reads
Podcast: Season 1 Episode 5

Swift Package Manager Grows Up? Xcode 11 will give us integration with the Swift Package Manager. Ju...


July 31, 2019 · 1 min read

Related Reads
Podcast: Season 1 Episode 4

I spent some time with SwiftUI. SwiftUI is the new layout kid on the block, let’s take a look and se...


July 31, 2019 · 1 min read

Related Reads
Podcast: Season 1 Episode 3

App Store Connect and TestFlight get an overhaul In this episode we take a look at the changes annou...


July 31, 2019 · 3 min read

Related Reads
Podcast: Season 1 Episode 2

Xcode 11 has a lot to offer All the new changes and features coming to Xcode 11, well the more obvio...


July 31, 2019 · 1 min read

Related Reads
Podcast: Season 1 Episode 1

Welcome to the Podcast / WWDC19 It finally happened, it took me a while to get enough courage togeth...


July 30, 2019 · 2 min read

Related Reads
Introduction

Back when Apple announced the Swift programming language at WWDC 2014, I immediately started learnin...


July 05, 2019 · 2 min read