ZHChat icon indicating copy to clipboard operation
ZHChat copied to clipboard

How to increase input tool bar height?

Open GopiK14 opened this issue 6 years ago • 1 comments

Hi Team,

Any solution to increase tool bar height, i tried preferredDefaultHeight but not working?

Thanks!

GopiK14 avatar Jun 02 '18 17:06 GopiK14

img_3898 What environment? I just tested the height is automatically increased.

You can see ZHCMessagesComposerTextView methods of this class.

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    // calculate size needed for the text to be visible without scrolling
    CGSize sizeThatFits = [self sizeThatFits:self.frame.size];
    float newHeight = sizeThatFits.height;
    
    // if there is any minimal height constraint set, make sure we consider that
    if (self.maxHeightConstraint) {
        newHeight = MIN(newHeight, self.maxHeightConstraint.constant);
    }
    
    // if there is any maximal height constraint set, make sure we consider that
    if (self.minHeightConstraint) {
        newHeight = MAX(newHeight, self.minHeightConstraint.constant);
    }
    
    // update the height constraint
    self.heightConstraint.constant = newHeight;
}

zhuozhuo avatar Jun 05 '18 02:06 zhuozhuo