WWDC22 SALE: Save 50% on all my Swift books and bundles! >>

Ultimate Portfolio Sorting Bug?

Forums > Articles

I noticed something that seems to be a bug in the code. I reviewed everything I wrote. Watched the videos and read the text.

But before I dig deeper into my own code or share it here for help, I thought I'd check if anyone else has the same issue. If yes, then this either is something we will be addressing in a later video, or something we need to flag up to Paul for addressing at some point.

I'm have completed up to Section 14 (included).

When we edit an item, it automatically shows the edit in the ProjectsView. so, if we add a top priority for an item and return back to ProjectsView, the icon will show automatically, but the ordering remains the same, until we tap the sort button. This creates the same problem we fixed for deleting items.

Basically after changing the item priority, the actual order in the database has changed but the UI hasn't. We end up deleting something else entirely.

Anyone else has that issue? or is it mine alone and I have to sift through the code again?

Thanks for taking the time.


Yes. well spotted. it updated in the next few videos


Ah great. Thanks for the info


Hey, so, after completing the currently existing videos, it still does not work. This was not addressed.

Do you by any change know which article fixed that issue? Because I went through them again, and it still does not sort instantly.

Again, it updates instantly when I make changes, such as title, or priority or completed. But it doesn't update the view according to sorting.


Sorry Marcus.

Mis-read your first post and have tried this on my Poject. And yes when you change an item( priority or competed) it stays in the same place on list, until you do something (go to another tab or tap sort, add new project etc).

If you want the list to be refreshed evertime you change something then yes it not correct, however thinking about it you maybe working your way though a list of to-dos and everthing moving after each uodate might be a confusion.

However if you find the solution then please post as I may try it out.



Hey, no worries  😉, thanks for trying it out though.

I'll send some feedback to Paul about that and in the meantime, continue trying. Had some ideas, but they all did nothing. Will surely post an update when I have one.



Hacking with Swift is sponsored by Emerge

SPONSORED Optimize your app’s startup time, binary size, and overall performance using Emerge’s advanced app optimization and monitoring tools. Reliably measure app size, speed up your app's startup time with Emerge's Launch Booster, and much more. Emerge is actively used by many of the top mobile development teams in the world.

Find out more

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.