nathantannar4 / InputBarAccessoryView

A simple and easily customizable InputAccessoryView for making powerful input bars with autocomplete and attachments
MIT License
1.15k stars 229 forks source link

padding is broken when you try to set it twice #262

Open gerchicov-vg opened 2 months ago

gerchicov-vg commented 2 months ago

Describe the bug I needed to change the bar height to place some additional content inside it but found the following: When you set padding.top for the second time and the second value is less than the previous one the size of the input bar remains the same and the text view looks like constrained to the top border.

To Reproduce Steps/code to reproduce the behavior: Took code from example and just added the following for "iMessageInputBar":

padding.top = 364
        DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
            self.padding.top = 8
        }

I also figured out that it is somehow related to the first padding.top = ... call. If I call it with delay everything works

Expected behavior padding works properly

Screenshots It is enough obvious to provide screenshots

Environment

Additional context