Right to left alignment for UITableView

I am working on an arabic app for iphone 3.0. I was wondering if there is a way that I can convert a UITableViewCell to be from right to left. I want everything to be in the opposite direction. Any thoughts?

+2
iphone right-to-left arabic hebrew
source share
2 answers

Creating your own subclass of UITableViewCell is not that difficult, and this is probably the first thing you want to do to get a personal touch. All you need is a custom XIB file and a bit of modified code in your cellForRowAtIndexPath function:

NSString *CellIdentifier = @"IndividualContractWithResult"; UITableViewCell *cell; ... cell = [thisTableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { // TODO: improve code by avoiding the view controller creation UIViewController *vc = [[UIViewController alloc] initWithNibName:@"IndividualContractWithResult" bundle:nil]; cell = (IndividualContractWithResult_Cell *) vc.view; [vc release]; } 
+2
source share

Hmm .. This is really interesting) I have no solution, but few suggestions. First of all, you can try using CGAffineTransformInvert to mirror your table. If this is useless, you can customize your tableView cells (do UIImageView on the left and UILabel with UITextAlignmentRight on the right). This is about your table. If you want to switch to a different view, you can simply change the table view with the UIViewAnimationTransitionFlipFromLeft animation instead of using the UINavigationController. This is not a beautiful solution, but it can do the trick) Good luck)

+2
source share

All Articles