Add rich graphics to your SwiftUI app

RSS for tag

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

Posts under wwdc21-10021 tag

6 Posts

Post

Replies

Boosts

Views

Activity

List view with .safeAreaInset modifier incorrect behavior
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!
1
0
590
Nov ’21
Update Text View upon function call
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 ?
1
0
504
Sep ’21
Creating Children Interactive book in Swift UI or Playground
Could you please show me an example of a complete project that shows how to create Children Interactive books in Swift UI or Playground with links to various pages of the book that i can follow step-by-step?
Replies
0
Boosts
0
Views
664
Activity
Mar ’22
XCode Storyboard
Hello, I don't see any view on the storyboard like the screenshot below. can someone help me? Thanks
Replies
1
Boosts
0
Views
668
Activity
Nov ’21
List view with .safeAreaInset modifier incorrect behavior
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!
Replies
1
Boosts
0
Views
590
Activity
Nov ’21
Update Text View upon function call
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 ?
Replies
1
Boosts
0
Views
504
Activity
Sep ’21
Hide the View when in use navigationBarItems
When I tap to move to another screen and go back to the previous screen the View on navigationBarItems is partially obscured Hope can you help me !... Thanks
Replies
1
Boosts
0
Views
803
Activity
Aug ’21
How to get this style of picker
Guys, please help I'm just a beginner and currently making my first app and I need this in that. I haven't yet started UIKit and an building this app in SwiftUI so preferably please give the answer for swiftui.
Replies
0
Boosts
0
Views
506
Activity
Jun ’21