我正在为 iphone 3.0 开发一个阿拉伯语应用程序。 我想知道是否有一种方法可以将 UITableViewCell 转换为从右到左。 我希望一切都向相反的方向发展。 有什么想法吗?
最佳答案
创建您自己的 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];
}
关于iphone - UITableView 从右到左对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1677988/