I have a UICollectionViewController
while doing the following:
- Return a string array in
collectionView:indexPathForIndexTitle:atIndex:
- Set
cell.contentView.backgroundColor = [UIColor redColor]
oncollectionView:cellForItemAtIndexPath:
Notice that changing the background color of the cell is just for demonstrating the issue. The important thing is to show index titles on the right.
The result (as following displayed) is that the content view takes the entire collection view width and it doesn't being affected (as it should) by the appearance of the index titles.
With UITableViewController
I am doing similar steps:
- Return a string array in
sectionIndexTitlesForTableView:
- Set
cell.contentView.backgroundColor = [UIColor redColor]
ontableView:cellForRowAtIndexPath:
Here, in contrast to the collection view behavior, the content view is "shrinking" as expected as following appear:
Can anyone tell if this is a bug or the expected behavior?