Add rich graphics to your SwiftUI app

RSS for tag

Discuss the WWDC21 session Add rich graphics to your SwiftUI app.

View Session

Posts under wwdc21-10021 tag

5 Posts
Sort by:
Post not yet marked as solved
0 Replies
313 Views
I am building a Stopwatch app for iOS. It has a Text View and 2 Button Views. Click Start Button, action is a function starttimer is called In this starttimer function I want to update the Text View with elapsed time How do I name Text View and refer it inside starttimer function ?
Posted
by
Post not yet marked as solved
0 Replies
232 Views
Hello! I noticed that the .safeAreaInset() modifier was not working as expected. The bottom elements of the List view get partially obstructed by the element at the bottom of the screen. As seen below: struct TestView: View {   var body: some View {             List {         ForEach(1..<30) { _ in           Text("Something")             .font(.largeTitle)         }         .frame(maxWidth: .infinity)               }                   .safeAreaInset(edge: .bottom) {       Button {                 } label: {         Text("Continue")           .frame(maxWidth: .infinity)       }       .buttonStyle(.borderedProminent)       .controlSize(.large)       .padding(.horizontal)     }   } } I attempted to test the safeAreaInset() modifier on a ScrollView instead and it seemed to be working as expected. struct TestView: View {   var body: some View {             ScrollView {         ForEach(1..<30) { _ in           Text("Something")             .font(.largeTitle)         }         .frame(maxWidth: .infinity)               }                   .safeAreaInset(edge: .bottom) {       Button {                 } label: {         Text("Continue")           .frame(maxWidth: .infinity)       }       .buttonStyle(.borderedProminent)       .controlSize(.large)       .padding(.horizontal)     }   } } In downloading this WWDC21 sample project you can see the same error in the GradientDetailView as this project uses List as well. Am I missing something? Or is this just a bug in SwiftUI? Any help would be greatly appreciated! Thanks!
Posted
by
Post not yet marked as solved
1 Replies
238 Views
Hello, I don't see any view on the storyboard like the screenshot below. can someone help me? Thanks
Posted
by