I wanted to make a UITableView with text that is both right-aligned and indented as depicted in the image below:

Unfortunately, I can not do this by writing :-
cell.textLabel.textAlignment = UITextAlignmentRight;
cell.indentationLevel = 10; // or even -10
Can this be done using UITableView‘s properties? If not, the only way I could think of is using [myString drawInRect:withFont:]; but I would like to go through methods based on alignment and indentation before getting into that [I have already written code for that 🙂 ], so other work-arounds are welcome!
Additional info: The indentation varies with accelerometer values so I can not have hard-coded Label frame positions. I’ve uploaded sample code at github in which I’ve used only the alignment and indentation info so far, so continuing to use that would make this easier.
Subclass
UITableViewCelland you can position theframeof the text label however you like. In theifstatement where youdequeueReusableCellWithIdentifier:where a reusable cell doesn’t exist, just modify theframeand then set the label to use the adjusted frame withsetFrame. The autoresizing mask should remain the same.