Apple has "soft deprecated" NSCell
and the various control-specific subclasses, but you can use them for this. You create one, configure its properties, and then tell it to draw in a frame in a view.
Getting the properties just right can be tedious. You might want to create a control of the relevant kind in a test project's view (using IB) and then interrogate its cell's properties programmatically. And/or configure such a control to use a custom subclass of the corresponding cell class which logs which methods are called on it with what parameters in various scenarios.