fixed autolayout issue with multiline labels

This commit is contained in:
Max Sokolov 2015-12-25 19:38:58 +03:00
parent 17c7475d2a
commit 5ca39ca499
2 changed files with 5 additions and 0 deletions

View File

@ -94,6 +94,11 @@ public extension TableDirector {
let builder = builderAtIndexPath(indexPath)
let cell = tableView.dequeueReusableCellWithIdentifier(builder.0.reusableIdentifier, forIndexPath: indexPath)
if cell.frame.size.width != tableView.frame.size.width {
cell.frame = CGRectMake(0, 0, tableView.frame.size.width, cell.frame.size.height)
cell.layoutIfNeeded()
}
builder.0.invokeAction(.configure, cell: cell, indexPath: indexPath, itemIndex: builder.1, userInfo: nil)