我一直在开发一个包含 ECSlidingViewController 项目的应用程序,以给我一个可以从左侧滑入的导航。导航链接位于 NSArray 中,并使用以下代码动态显示到 UITable 中:
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSString *cellIdentifier = @"MenuItemCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
            cell.contentView.backgroundColor=[UIColor blueColor];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier];
    }
    cell.textLabel.text = [self.menuItems objectAtIndex:indexPath.row];
    return cell;
}
问题在于,一旦我们查看滑出控制器,文本的长度就太长而无法显示。现在看起来像这样:

如果可能的话,我希望能够减少单元格宽度,甚至将文本分成两行并使其看起来更像这样:

任何有用的建议将不胜感激!