左からスライドインできるナビゲーションを提供する 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;
}
問題は、スライド アウト コントローラーを表示すると、テキストが長すぎて表示できないことです。次のようになります。
可能であればセルの幅を減らすか、テキストを 2 行に分割して、次のように表示できるようにしたいと考えています。
役立つアドバイスをいただければ幸いです。