Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to increase input tool bar height? #63

Open
GopiK14 opened this issue Jun 2, 2018 · 1 comment
Open

How to increase input tool bar height? #63

GopiK14 opened this issue Jun 2, 2018 · 1 comment

Comments

@GopiK14
Copy link

GopiK14 commented Jun 2, 2018

Hi Team,

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

Thanks!

@zhuozhuo
Copy link
Owner

zhuozhuo commented Jun 5, 2018

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants