• watchOS용 앱 디자인하고 빌드하기

    watchOS의 디자인 원리에 대해 자세히 알아보고 SwiftUI를 사용해 디자인 원리를 앱에 적용하는 방법을 알아보세요. 새롭게 디자인된 사용자 인터페이스에 맞는 앱을 빌드하여 시의적절한 정보를 표시하고, 압축된 콘텐츠를 한눈에 전달하며, 일관되고 예측 가능한 탐색 방법을 구현하세요.

    챕터

    리소스

    관련 비디오

    WWDC23

  • 다운로드
    Array
    • 13:26 - Dial Based View

      // This is an example of using scene padding to position a Circle according
      // to the Dial layout grid
      struct DialBasedView: View {
          var body: some View {
              ZStack {
                  // Add a view to make the ZStack fill the available width, allowing the
                  // Circle to position correctly. As an example, we use a rectangle.
                  Rectangle()
                      .foregroundStyle(Color.clear)
      
                  // Use .scenePadding(.horizontal) on the dial to get the correct
                  // width. In a ZStack with centered alignment, it is correctly
                  // positioned.
                  Circle()
                      .foregroundStyle(Color.red)
                      .scenePadding(.horizontal)
              }
              // Ignore vertical safe areas to allow the view to draw into the bottom
              // safe areas. This achieves the centering for the dial.
              .edgesIgnoringSafeArea(.vertical)
          }
      }