我正在为 iphone 3.0 开发一个阿拉伯语应用程序。我想知道是否有一种方法可以将 UITableViewCell 转换为从右到左。我希望一切都朝着相反的方向发展。有什么想法吗?
问问题
3452 次
2 回答
2
嗯..这真的很有趣)我没有解决方案,但很少有建议。首先,您可以尝试使用 CGAffineTransformInvert 来镜像您的表。如果它没有用,您可以自定义您的 tableView 单元格(在左侧制作 UIImageView,在右侧制作带有 UITextAlignmentRight 的 UILabel)。这是关于你的桌子的。如果你想去另一个视图,你可以用 UIViewAnimationTransitionFlipFromLeft 动画来改变你的表格视图,而不是使用 UINavigationController。这不是一个很好的解决方案,但它可能会奏效)祝你好运)
于 2009-11-05T06:36:13.887 回答
2
创建您自己的 UITableViewCell 子类并不难,并且可能是您想要获得自定义外观的第一件事。您只需要一个自定义 XIB 文件和一些修改过的代码在您的 cellForRowAtIndexPath 函数中:
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];
}
于 2009-11-05T22:31:36.560 回答