I have a UILabel that contains an NSMutableAttributedString attached to it which was generated dynamically from a model.
What I'm looking to accomplish is if ever the UILabel's dynamic height reaches a specific height with the NSMutableAttributedString in it, I would like to add another UILabel to the subview or maybe multiple more UILabels if the NSMutableAttributedString is too long.
An array of NSAttributedString from NSMutableAttributedString would be ideal.
Let's say I have this very long NSMutableAttributedString, then I've set my height limit to 100 for one UILabel.
Ex:
Given String:
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
* qwe
Height limit: Let's say we calculated that 4 lines would fit per 100 height. This would result into. An array of NSMutableAttributedStrings
let result = ["* qwe\n * qwe\n * qwe\n * qwe\n",
"* qwe\n * qwe\n * qwe\n * qwe\n",
"* qwe\n * qwe\n * qwe\n * qwe\n",
"* qwe\n * qwe\n * qwe\n * qwe\n"]
This would be easy to populate into multiple UILabels.