Code Completion

71: The Owl That Is SwiftUI


Listen Later

Welcome to Code Completion, Episode 71! We are a group of iOS developers and educators hoping to share what we love most about development, Apple technology, and completing your code!

Follow us @CodeCompletion on Twitter to hear about our upcoming livestreams, videos, and other content.

Today, we discuss:

  • SwiftUI’s layout model:
    • Understanding SwiftUI Layout Behaviors
    • .fixedSize()
    • Color and ZStack:

    • ZStack {
      Color.clear
      .frame(height: 1)
      Text("Hi!")
      }
    • Content Shape:

    • Color.clear
      .contentShape(Rectangle())
      .onTapGesture { print("tapped") }
    • Button Padding:

    • Button(action: doTheThing) {
      Text("Do It")
      .padding(20)
      }.padding(-20)
    • Equal Widths:

    • HStack {
      Text("Hello, world!")
      .fixedSize(horizontal: true, vertical: false)
      .padding()
      .frame(maxWidth: .infinity)
      .background(Color.green)
      Text("Hi!")
      .fixedSize(horizontal: true, vertical: false)
      .padding()
      .frame(maxWidth: .infinity)
      .background(Color.green)
      }.background(Color.red)
      .frame(width: 250)
    • Commented Out:

      • Ocarina of Time on Switch improved
      • Your hosts for this week:

        • Spencer Curtis
        • Dimitri Bouniol
        • Be sure to also sign up to our monthly newsletter, where we will recap the topics we discussed, reveal the answers to #CompleteTheCode, and share even more things we learned in between episodes.

          You are what makes this show possible, so please be sure to share this with your friends and family who are also interested in any part of the app development process.

          Sponsor

          This week's episode of Code Completion is brought to you by Sticky Widgets. Go to https://apps.apple.com/app/apple-store/id1533254320?pt=1765080&ct=CodeCompletion&mt=8 today to check it out!

          ...more
          View all episodesView all episodes
          Download on the App Store

          Code CompletionBy Code Completion

          • 4.4
          • 4.4
          • 4.4
          • 4.4
          • 4.4

          4.4

          7 ratings