AUTHOR: Andy Trevorah

Gitter is a communication product for communities and teams on GitHub. Find out more at gitter.im.

Navigation

Drop Database Migration in Core Data

Core Data supports migrating persistent stores (databases) from one model (schema) to the next without losing the existing content. It involves keeping versions of your model and the required mappings between them. However if you have a REST based app, then you are probably fine with not having to migrate the user's content as you can just fetch it all again from the server. You can do this in a surprisingly simple way (just make sure…

The Command Line

This post has been adapted from a talk I originally gave at codebar, which is a non-profit initiative that facilitates the growth of a diverse tech community by running regular programming workshops. It is targeted to those who are learning to code. This post is in two parts, a little history, followed by some live command line examples. History Way back in the 60s - 70s, computers were becoming more than just calculators. They could save…

How to Cache Fragments in Android

If you have an Android app with multiple fragments that are unable save state (e.g they have a WebView), it can be a real drag to your users when state is lost when navigating around your app. To fix this, we can cache the fragments that your user has visited by using some features of the FragmentManager. 0: Creating a Master-Detail app For this, we can use a the built-in Master-Detail template. We'll be using…

How to cache view controllers in iOS

If you have an iOS app with multiple child view controllers, it can be annoying when their layout state is lost when switching between them. Scroll View and Web View state are tricky to persist, but we can instead cache the entire view controller with NSCache. 0: Creating a Master-Detail app For this we will use Xcode's starter template, but with a text view to show the scroll state. Our setup has a few tweaks from…

Why A369D5 means "purple"

This post has been adapted from a talk I originally gave at codebar, which is a non-profit initiative that facilitates the growth of a diverse tech community by running regular programming workshops. It is targeted to those who are learning to code. If we wanted all our links to be "codebar purple", we would write a css rule like this: a { color: #a36965 } But this seems like a weird way to describe "codebar purple". You may…