I want to rotate tickmark labels to look something like this:

I tried using alterTickMark:beforeAddingToAxis: then tickMark.tickLabel.transform = CGAffineTransformMakeRotation(-M_PI / 2) but that doesn't seem to work.
Is it possible to rotate the tickmark labels of the X Axis?