views:

367

answers:

2

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

+2  A: 

Hmm.. It's really interesting) I have no solution, but few suggestions. First of all, you can try to use CGAffineTransformInvert to mirror your table. If it wil be useless, you can customize your tableView cells(make an UIImageView at the left side and UILabel with UITextAlignmentRight at the right). This is about your table. If you want to go to another view, you can just change your table view with UIViewAnimationTransitionFlipFromLeft animation instead of using UINavigationController. It's not a pretty solution, but it may do the trick) Good luck)

Morion
i went with the UITableViewCell.. that worked well for my needs.. thanks
Adhamox
+1  A: 

Creating your own UITableViewCell subclass is not that hard to do and is probably the first thing you'll want to do to get a custom look. All you'll 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];
}
Epsilon Prime
Thanks,yes i went with the Custom UITableViewCell subclass :)
Adhamox
@Adhamox : Could you share your code of the UITableView. I am also facing the same issue.
Franklin