UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Deleting an item in landscape mode, the Edit form on the Secondary view remains populated?

Forums > Videos

I am following the UltimatePortfolio App videos, and using them to help me write my own app. Simulation - iPhone 11, on Big Sur.

One thing that is bugging me is when in landscape mode. When the simulation is first run, and no items exist in Core Data, the secondary view shows the text from the SelectSomethingView() function (see the video 'Finishing ProjetsView').

If I now add an item (pop-up on the left hand side - primary view) , edit it, etc. then fine. The edit item remains in the background on the secondary view. This is not a major concern, as at least the item exists, and it is the one on the primary view. If I then delete the item on the primary view, so now the Core Data is empty, I can return to the secondary (edit) view and the item details can still be modified, albeit there is no actual real Core Data entry behind it now.

Ideally, and correctly, the secondary view should return to the initial - no Core Data items exist - and display the text from the SelectSomethingView() function again.

I know that Paul (HWS) has covered a similar issue (see the video 'Core Data delete rules and predicates') in deleting Project and Item core data entities, using the cascade method, however that was in portrait mode.

Did I miss something in the videos - in which case which video? Has anyone else experience this kind of problem in landscape mode, and were you able to resolve it? Is it a feature (bug) in the iPhone 11 simulator?

Any thoughts or help would be appreciated.

Thank you.

5      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free 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.