Post

Replies

Boosts

Views

Activity

Reply to SwiftUI iOS 14 beta TextField 100% CPU
After doing a lot of digging - it seems like some issue with the tab view and keyboard. When I first click on a keyboard, the onAppear method of every single view contained within the tab view is called, which leads me to think that there is some bug, which tries to render every view in the tab view at the same time when the keyboard is brought up, causing some weird loop. I tried changing the TabView to use         .tabViewStyle(PageTabViewStyle(indexDisplayMode: .never)) .ignoresSafeArea(.all, edges: .bottom) the problem does not happen anymore. However, this changes the animation for navigation links inside the tab view, which kind of sucks.
Nov ’20
Reply to SwiftUI iOS 14 beta TextField 100% CPU
Not sure if this adds more context, but I have a TabView, which contains a NavigationView, which contains a view with a TextField. The CPU usage seems to go down when switching to a different tab, but within the same tab, the CPU stays at 100% indefinitely, causing the phone to burn up. This only happens the first time I bring the keyboard up after launching the app.
Sep ’20