Not fully backwards compatible to prior versions / implementations of this component
Just note that due to the major rewrite, a few things changed in this version. If you want to update your project to 2.0 read the section Updating to 2.0 below.
Performance and Memory
In this new version there will be only UMCellViews created and passed to
layoutView: of rows that are actually visible. While scrolling, views that are not visible anymore will be removed for later reuse and rows that have become visible will be redrawn and passed to
layoutView:. This makes it possible to display and edit huge tables without memory issues or scrolling speed impact.
Always a fresh UMCellView
In former versions you had to take care of removing former subviews that you might have added. Now you will always get a fresh UMCellView which won't have any subviews other than its label and no gesture recognizers either.
All rows now must have the same height
This was necessary to ensure good performance.
Removed Feature: Visual Row Deletion
deleteRow has been removed. Please have a look at the example 'AddRemove' to achieve a similar effect.
Added Feature: Access Views
viewInRow:column: has been added so that effects like 'visual deletion' are possible. Please use this method with care since it may return nil if a view has been removed (as it's not visible anymore). It's also not the right place to change its content, please change your model instead and call
refresh on the table.
The following examples were added to the source code package:
Shows how to add gesture recognizers and handle touches on cells.
Shows how to show less columns in portrait orientation.
Shows how to dynamically add columns and rows to the table/model.
Shows how to sort your model (ascending and descending) and update the table.
Updating your code to 2.0
To update your project you have to follow these steps:
Copy the new sourcefiles to your project (-> Replace UMTableView folder).
Change the delegate method
Remove any calls to
deleteRow if you have been using this feature. (Sorry).
Clean your project, build and keep an eye out for warnings.