ios - UITableViewDelegate tableView:heightForRowAtIndexPath: crash when inserting cells -


I have a table view with different sections and cell styles, i.e. the iOS Settings app.

I have a problem with height ForRowAtIndexPath If I include it, whenever I try to insert a cell, the app crashes:

< Previous> 2014-07-27 17: 24: 48,660 Shudules [413: 31582] *** Exception 'NSInvalidArgumentException', Reason: '*** - [NSArrayM insertObject: atIndex:]: Object can not be zero '

However, because there are several types of cells in the table view, I need to implement the method, for example, most Ikaon 44px tall, but I do not give a date picker cells that is always visible and 216px tall. If I use auto layout, the height of the cells is fine, but the animation is jumping to include the cells.

I did not have to face this problem before, but I decided to split one of these sections into the table in two different sections Now, whenever I try to insert a cell The app crashes, this was not before, and only occurs when the heightForWindexpath or the predicted whitefirereading path is applied.

I found this, but it does not offer any option - it only says do not apply height to Earthpath, which I have to do. Is there any way to solve it?

Edit heightForRowAtIndexPath's implementation was added - it's not anything complicated (I have some dates for some sections and rows, datePickerIndex is the line of the date picker or if zero It does not exist)

  - (CGFloat) TableView: (UITableView *) TableHigh HeightForoutindPath: (NSIndexPath *) Index path {if (indexPath.section == ScheduleEditorSectionDates & amp; amp; DatePickerIndex & Amp; indexPath.row == self.datePickerIndex) return 216.0f; Return 44.0 f; }  


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -