NEW: Learn to build the incredible iOS 15 Weather app today! >>

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.

   

Hacking with Swift is sponsored by Essential Developer

SPONSORED Only until this Sunday, December 12th, you can join a free crash course to learn advanced techniques for testing new and legacy Swift code — it's the fast track to becoming a complete Senior iOS Developer!

Click to learn more

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

Reply to this topic…

You need to create an account or log in to reply.

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.