Posts in "Coding"

Trouble with NSDiffableDataSourceSectionSnapshot

I’m running into issues when trying to use NSDiffableDataSourceSectionSnapshot. I want to have this UI, where we have multiple sections and each section has builds, but the additional builds are collapsible. This works, however, since there are a large number of sections there is some significant UI hangs. I played around with the number of sections and the magic number appears to be 80. 80 sections or less and there are no UI hangs, but anything over that will experience a hang.

It is definitely a case of the Mondays today. I was thinking that I broke push notifications, only to realize that I was using the device token from the simulator instead of from my device. 🤦🏼‍♂️

What a way to start a Monday. Could not remember how to pass a type as a function parameter and had to look it up to remind myself to add .Type. How’s your Monday going? 🤦🏼‍♂️

Slowly but surely I am learning to bend UICollectionViewDiffableDataSource to my will. Still have a lot to learn, but figuring out the best way to structure the data for the snapshots has been my biggest challenge. Not making the section identifier as simple as possible initially was my biggest mistake.

Staring at a newly created project in Xcode is, to me, like a writer staring at a blank piece of paper.

Number of days that I forgot to set translatesAutoresizingMaskIntoConstraints to false? Zero. 🤦🏼‍♂️

Falling down the rabbit hole of refactoring some code thinking that it can, or should, be cleaned up a bit only to end up back where I started and realizing that this approach is perfectly fine.

I spent an embarrassing amount of time, this morning, trying to figure out why my collection view cells weren’t refreshing when I updated the snapshot. Only to realize that I had added a custom equatable function to the struct that was only checking the id value, which doesn’t change. 🤦🏼‍♂️

I am not sure who needs to hear this. At 42, I still deal with imposter syndrome. Asking for help can, sometimes, be such a challenge. There is no silver bullet to get rid of this. Just keep rocking you and know that you are not an imposter, and you deserve to be doing what you are doing. 😊