Better HN
topnewbestaskshowjobs
Log inSign up

arigrant

12 karma · joined Jan 20, 2014 (12y ago) · 5 submissions

Submissions

comment 11y ago · link · parent

We actually use GCD a lot. In components we use a background queue for allocating and measuring/laying-out component trees and then we punt them over to the main queue for "mounting" (attaching them to UIViews that we create or recycle and configure).

For the mem-models portion we also use GCD all over the place. However when we had mutable models (and used Core Data) we had data races, something GCD can't really help you. Moving to immutable models actually makes our system work really well with GCD because you can pass immutable objects around threads without much concern really.

For autolayout, we did some explorations and ultimately decided (especially for low-end devices) that having our layout calculations occur on the main-thread was too cpu-intensive for some of our more complex-layouts (which are quite common in feed).

Before mem-models we explored what the best cutting-edge practices were in using Core Data but ultimately we were using it as a cache and not as an ORM - wrong tool for the job.

Before components we looked at vanilla UIKit, re-approaching an MVC-style architecture given the lessons we had learned, and using Autolayout instead.

I hope this provides a little more insight.

comment 12y ago · link · parent

Show/hide are also super duper helpful.

3.

Objective-C Unrecognized Selectors in *Great* detail(arigrant.com ↗)

2 points · by arigrant · 12y ago · discuss

4.

The Amazing Adventures of NSArray(arigrant.com ↗)

9 points · by arigrant · 12y ago · discuss