« first day (1248 days earlier)      last day (1180 days later) » 

6:25 PM
1 message moved from PHP
 
7:03 PM
I've a code for that...
Now when I add the constrains to the 2 textview I get this error
2014-07-22 14:34:07.019 mobile-app[415:60b] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
 
When adding constraints programmatically - The first thing to do is to set translatesAutoresizingMaskIntoConstraints to NO
 
The constrains are being added using storyboard
 
But you said text view resizes programmatically?
 
ajam...
- (CGFloat)heightForTextView:(UITextView*)textView containingString:(NSString*)string
{
float horizontalPadding = 24;
float verticalPadding = 16; //16
float widthOfTextView = textView.contentSize.width - horizontalPadding;
NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:kFontSize]};
CGSize size = CGSizeMake(widthOfTextView, 999999.0f);
CGRect rect = [string boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:nil];
CGFloat height = ceil(rect.size.height) + verticalPadding;
 
user457812
8:00 PM
8 messages moved from NSChat
 

« first day (1248 days earlier)      last day (1180 days later) »