wordpress-mobile/WordPress-iOS — pull request #1872 by aerych (2014-07-01 03:53:03+00:00)
Title: Issues/1729 layout cleanup

Fixes #1729

What it does
- Divides WPContentView and ReaderPostView into ten new bite-sized classes based on function and responsibility.
- Uses autolayout for all the new classes instead of setting frames in layoutSubviews .
- WPRichTextView is a reusable class wrapping DTCoreText’s DTAttributedTextContentView
- WPContentViewBase is intended to replace WPContentView (and should probably take its name when its replaced)
- Gets rid of expensive string length calculations in favor of correctly truncating with an ellipsis.
- Gets rid of some unneeded render cycles.
- Moves size calculations out of view controllers by leveraging sizeThatFits:

What it does not
- Does not replace WPContentView throughout the app. This was reader focused and limits the scope of the changes just to the reader. WPContentView is still used by the comment feature, but could be replaced. WPRichContentView anticipates this change since, iirc, the comment feature uses rich text to support links.

Further improvements
- Update the comment feature to replace WPContentView.
- ReaderImageView, ReaderVideoView, ReaderMediaView and ReaderMediaQueue could be generalized to better fit with WPRichTextView.