TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

SwiftUI Attribute Cycling, Use of Navigation or Disclosure View

Forums > SwiftUI

I was getting this general vague frustrating runtime warning quite a bit. After turning over a lot of rocks, I went through some other people's code and saw that I had put my NavigationView declaration in the middle of the main view. That is, the main view was composed of varoius stack views to provide some picker controls for list filtering, then a list of filtered items in a List-ForEach below the pickers. The Navigation View was around the List but not the pickers. Also, maybe important, the main view was itself was inside of a bunch of nested tabbed views.

Selecting a new row would generate the attribute graph cycling warning. Also, tabbling to another view would not allow tabbing back to this view until I performed the action twice. Periodically, I would get hard crashes.

Moving the Navigation View to encompass the entire view code appeared to have solved this problem.

Another aggravating aspect is that the first time I ran the app after the change, I was still getting the same problems until I did a CLEAN BUILD.

UPDATE: The problem came back and I even rewrote the views using a disclosure group and still getting cycling warnings and even crashes now. It may have something to do with the filtering function I am using. The crash report indicates the wrong number of items in the NS table update routine. I am going back to basics and try to build up the functionalty little by little from scratch and go back to Paul's SwiftUI by example tutorial.

3      

Hacking with Swift is sponsored by Blaze.

SPONSORED Still waiting on your CI build? Speed it up ~3x with Blaze - change one line, pay less, keep your existing GitHub workflows. First 25 HWS readers to use code HACKING at checkout get 50% off the first year. Try it now for free!

Reserve your spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.