MengTo / DesignerNewsApp

Build a Swift App as a designer
http://designcode.io
2.42k stars 367 forks source link

Fixing text layout after rotation #97

Closed jamztang closed 9 years ago

jamztang commented 9 years ago

slack_for_ios_upload_1024

Our problem is that after rotation, text are not utilising the width of the cell. Although we've properly configured our auto layout constraints on that, the problem actually lies in how DTCoreTextContentView implemented.

  1. My patch makes sure CoreTextView always relayoutText() if bounds has changed
  2. The our VC should reload our table view after rotation since cell height is probably changed.

This might not be perfect but definitely more reliable in my testing.

MengTo commented 9 years ago

Tested it and it worked! Thanks @jamztang