Subramani Subramani - 1 year ago 169
iOS Question

How to increase label or text view size (height and width) in tableview by objective c(For Conversation Page) Can you Help me?

I can't Increase Label or Textview Size in table view by objective c.

I'm Struck for this problem.

Answer Source

If you use textview

        CGFloat fixedWidth = textView.frame.size.width;
        CGSize newSize = [textView sizeThatFits:CGSizeMake(fixedWidth, MAXFLOAT)];
        CGRect newFrame = textView.frame;
        newFrame.size = CGSizeMake(fmaxf(newSize.width, fixedWidth), newSize.height);
        NSLog(@"this is updating height%@",NSStringFromCGSize(newFrame.size));



Get the height from this method then set it to heightforrow method

Set constraints for the textview leading,trailing,top,bottom.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download