Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storyboards: what is the "Index Row Limit" field?

In Storyboards, TableViews have an attribute field named "Index Row Limit". The default is 2. I cannot find any information on what this is. A Google search returns a single page of results and half of the results are non-English. Does anyone know what this field is for?

like image 414
Kent Avatar asked Aug 22 '12 00:08

Kent


1 Answers

It's related to the sectionIndexMinimumDisplayRowCount property on UITableView. Basically, if you have less than that many rows in the table, any section index will be hidden. (The section index is the bar on the right hand side of the table that usually has the letters A-Z, which lets you quickly jump through the list.)

Update: I've verified that setting the "Index Row Limit" in the .xib or .storyboard does indeed change a value in the underlying XML titled sectionIndexMinimumDisplayRowCount, so it's clear that's what this property is supposed to be related to. However, it also appears that there's a bug in UITableView (at least as of iOS 5.1), such that the setting in Interface Builder isn't actually being properly set on the object when it is unarchived at runtime. Time to file a radar!

like image 190
BJ Homer Avatar answered Sep 28 '22 02:09

BJ Homer