DEV Community

Sean Walker
Sean Walker

Posted on


Do Good Daily Day 7

πŸ“… 09/18/2019
πŸ”₯ 7 day streak
πŸ“± Do Good Daily
πŸ’° $0.99 price
πŸ€‘ 0 sales
⌚️ 6 hours spent
πŸ’» 7 files changed 42 additions(+) 2 deletions(-)
πŸ™…β€β™€οΈ Today's goal: Get the text editor working

SwiftUI TextField placeholder

Look, I'm not going to sit here and wax poetic about my 30 minutes of side project work today, I'll just go ahead and say, I didn't do what I set out to do. Having a full time job and a family is hard effin work.

Let's talk about textfields and placeholders, the only thing I did today:

screenshot of a swiftUI preview that shows in vertical order, today's day and then a picture of a sun, and text saying "What good shall I do this day?"

TextField("My good for today", text: self.$input)
    .font(.custom(font, size: 18))
Enter fullscreen mode Exit fullscreen mode

and that's it! Oh wait, I also figured out how to format today's date:

let fmt = DateFormatter()
fmt.dateFormat = "EEEE, MMMM dd" = fmt.string(from: Date())
Enter fullscreen mode Exit fullscreen mode

and THAT's it!

Latest comments (0)

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.