TTTableView with shadows (self.showTableShadows = YES) will cause a crash under iOS 5 when the user tries to scroll inside the table.
self.showTableShadows = YES
This crash happens because the layoutSubviews function tries to use the shadow layer after the layer was already removed and released. This is an issue in iOS 5, because layers are automatically released when removeFromSuperlayer is called.
The fix creates a new shadow layer after the original shadow layer is released and removed. Generally, a layer shouldn't be used after removeFromSuperlayer is called.
Closes #733 as well.
TTableView shadow crash fix on iOS 5
Merge pull request #755 from aporat/TTableView/shadow_crashfix
TTTableView shadow crash fix