We recently dropped iOS 5 so we could use the new 6+ APIs without backwards compatibility.
It makes me smile every time I notice IGListKit at work in Instagram. We put a lot of work into making and improving it. Proud to see it holding up 4 years later.
🧵 with some memories on how it was built:
We recently dropped iOS 5 so we could use the new 6+ APIs without backwards compatibility.
Except two things bugged the hell out of me:
1. No animated changes (duh)
2. Images could flicker and the like animation could cancel
If something triggered another reload after the animation started, the cell cancelled the animation (thus the UI bug)
When an image cell is reused set the background to grey, async load the image (cache or network), set the image. The async time between reuse and fetch/set from cache is where the flicker came from.
Enter UICV performBatchUpdates
So how the hell do I write a diffing algorithm? I literally had never done this.
I settled on Paul Heckel’s https://t.co/jpxuHNlpXg
Why?
1. It’s output matched UICV’s APIs: inserts, deletes, updates, and moves
2. There were example implementations I could actually understand
Foundation hashes can collide
https://t.co/h9eVHO342U
Or are too basic for diffing
https://t.co/Pp0eVFRS5e https://t.co/ZNPJnXlXa4
https://t.co/BACvyI2l08+
With profile done, I submitted a -12k change to remove the old infra.
Throughout this the eng team 10x’d and users 4x’d, we launched tons of products (Stories!), IG opened a NY office, UICV got diffable data sources, and more.
More from Social media
✨📱 iOS 12.1 📱✨
🗓 Release date: October 30, 2018
📝 New Emojis: 158
https://t.co/bx8XjhiCiB
New in iOS 12.1: 🥰 Smiling Face With 3 Hearts https://t.co/6eajdvueip
New in iOS 12.1: 🥵 Hot Face https://t.co/jhTv1elltB
New in iOS 12.1: 🥶 Cold Face https://t.co/EIjyl6yZrF
New in iOS 12.1: 🥳 Partying Face https://t.co/p8FDNEQ3LJ
🗓 Release date: October 30, 2018
📝 New Emojis: 158
https://t.co/bx8XjhiCiB

New in iOS 12.1: 🥰 Smiling Face With 3 Hearts https://t.co/6eajdvueip

New in iOS 12.1: 🥵 Hot Face https://t.co/jhTv1elltB

New in iOS 12.1: 🥶 Cold Face https://t.co/EIjyl6yZrF

New in iOS 12.1: 🥳 Partying Face https://t.co/p8FDNEQ3LJ

You May Also Like
1/Politics thread time.
To me, the most important aspect of the 2018 midterms wasn't even about partisan control, but about democracy and voting rights. That's the real battle.
2/The good news: It's now an issue that everyone's talking about, and that everyone cares about.
3/More good news: Florida's proposition to give felons voting rights won. But it didn't just win - it won with substantial support from Republican voters.
That suggests there is still SOME grassroots support for democracy that transcends
4/Yet more good news: Michigan made it easier to vote. Again, by plebiscite, showing broad support for voting rights as an
5/OK, now the bad news.
We seem to have accepted electoral dysfunction in Florida as a permanent thing. The 2000 election has never really
To me, the most important aspect of the 2018 midterms wasn't even about partisan control, but about democracy and voting rights. That's the real battle.
2/The good news: It's now an issue that everyone's talking about, and that everyone cares about.
3/More good news: Florida's proposition to give felons voting rights won. But it didn't just win - it won with substantial support from Republican voters.
That suggests there is still SOME grassroots support for democracy that transcends
4/Yet more good news: Michigan made it easier to vote. Again, by plebiscite, showing broad support for voting rights as an
5/OK, now the bad news.
We seem to have accepted electoral dysfunction in Florida as a permanent thing. The 2000 election has never really
Bad ballot design led to a lot of undervotes for Bill Nelson in Broward Co., possibly even enough to cost him his Senate seat. They do appear to be real undervotes, though, instead of tabulation errors. He doesn't really seem to have a path to victory. https://t.co/utUhY2KTaR
— Nate Silver (@NateSilver538) November 16, 2018