HueInspired - an iOS App Post Mortem

My current project is “HueInspired” - an iOS app for color palette generation from photos and I’m coming close to completing v1.0. Its been a blast and as a form of catharsis / chance to share what I learnt, I’m here to coherently ramble about the interesting points of ...

Category: Tech Tags:

Autolayout Margin anchors vs Dimension anchors

Recently I was testing my custom table cells with dynamic type sizes and even though I didn't have any text present I noticed sub views changing sizes - intrigued, I investigated.

My cell content was ridiculously simple, just one view that filled the whole parent content view, so what could ...

Category: Tech Tags:

Creating Class level Properties in Python

So what happens when you want a computed class property in python?

Descriptors are invoked via the __getattribute__ so simply assigning a descriptor to a class level attribute won't do. Instead you need to create the class level property as a instance variable on the classes type object and ...

Category: Tech Tags:

Use Unittests to Explore 3rd Party APIs

One of the ideas I've adopted recently is to use unittests to assert the contract between you and a 3rd party API. It's pretty normal to explore api usage in the REPL but by writing it formally as a series of tests you can record your findings and ...

Category: Tech Tags:

Restoring ViewControllers and their Data sources (WIP)

The traditional flow for restoring view controllers in UIKit goes likes this:

  1. (Required) Assign restoration identifiers to the view controllers
  2. (Required) Tell iOS how to create or locate new view controller objects at launch time.
  3. (Optional) Encode current State for later restoration

Recreating the hierarchy of view controllers is indeed ...

Category: Tech Tags:

Note to Unowned Self

Its easy to think that the answer to all closure woes is to just declare self unowned - no more reference cycles for me! However this is a very easy way to crash! Been there, done that, never again.

let me translate what 'unowned' means:

I am not the owner of ...

Category: Tech Tags:

Python Bindings for TargetProcess

Where can you find them? In one of my side projects: tpapi - an unoffical python client for TargetProcess. It takes care of interacting with the REST api and returns nice model objects for you to interact with. Some useful features worth mentioning:

Transparent Pagination of Resource Requests

Every collection of ...

Category: Tech Tags:

Testing Mac Gatekeeper

Gatekeeper on macOS guards against the execution and installation of applications from unknown sources. In order to pass this security check an application needs to be correctly signed which means its a good requirement to check before a release.

The key gotcha to watch out for when testing is to ...

Category: Tech Tags:

Python Descriptor Notes

  • Descriptors are any object that conform to the descriptor protocol __get__,__set__ and __del__. Properties are a common example
  • Descriptors are class level objects and you must use the obj reference passed to it in order to access the parent object.
  • This is because the descriptor protocol methods are invoked ...
Category: Tech Tags:

© Ashley Arthur 2016

Powered by Pelican