I've encountered a strange issue. At first it happened on one app when I set several view to equal width and equal leading\trailing constraints. Everything worked fine on iOS 8.x but on iOS 7.x I saw that the last view's trailing constraint went missing.
It wasn't a big deal but now I have a big problem. I am working on a new application and one of the features is chat with a user. I have set two possible table cells (incoming message and outgoing message). Each cell contains a UITextView to hold the text (it needs to identify links and phone numbers). The textView's size depends on the content text and the size of the "bubble" changes according to it's size. Again, on iOS 8.x all works perfectly!!! SWEET! And again... iOS 7.x fails to do it! without a visible reason, texts are getting truncated, words are disappearing and line breaks occur out of no-where. I have no implementation that adjusts the textView's size... it's all autolayout based.
How can I fix this. I searched for an answer but I'm not even sure how to describe it. Help? Anyone?
Edit:
Had a day off yesterday :) Thank for the replies...
I have an image of the constraints I set up... Constraints
Now, in my tableView's heightForRowAtIndexPath, I return a height calculated by the message object:
- (CGFloat)height {
CGRect rect = [self.body boundingRectWithSize:CGSizeMake(210.0, CGFLOAT_MAX)
options:NSStringDrawingUsesLineFragmentOrigin
attributes:@{NSFontAttributeName:[UIFont fontWithName:@"OpenSans" size:15.0]}
context:nil];
return rect.size.height + kCellHeightDelta;
}
I don't want to uses someone else's library, no matter how good it is. My client has his desires for what he wants it to look like and would rather put more time into it, doing what's right for the project, than copy-paste someone else's implementation without understanding what I'm missing. But I truly am grateful.