Nativescript: how to collapse view when software keyboard is shown on iOS?
<p>I have a chat screen and when the textfield is focused iOS soft keyboard appear. It overlaps the view and the textfield and the send button get hidden. Is there a way to collapse the view in the way that outer GridView height would be equal GridView height - soft keyboard height? This will allow to all elements to be visible.</p>

<p>Here is my xml layout:</p>

<pre><code>&lt;Page id="main"
  xmlns="http://www.nativescript.org/tns.xsd"
  navigatingTo="onNavigatingTo"&gt;

        &lt;GridLayout rows="auto, auto, *, auto, auto"&gt;

            &lt;!-- Title --&gt;
            &lt;Label text="{{ L('chat', 'title') }}" class="title title-bar" row="0"/&gt;
            &lt;StackLayout class="line" row="1"/&gt;

            &lt;ListView id="messagesList" items="{{ messages }}" separatorColor="transparent" row="2"&gt;
                &lt;ListView.itemTemplate&gt;
                    &lt;GridLayout columns="auto * auto" class="chat-item"&gt;
                        &lt;Label text="{{ getChatUserName(isUser) }}" class="chat-avatar"
                               col="{{ isUser ? '2' : '0' }}"/&gt;
                        &lt;Label text="{{ message }}"
                               class="{{ isUser ? 'chat-message chat-message-user' : 'chat-message' }}"
                               textWrap="true" col="1"/&gt;
                    &lt;/GridLayout&gt;
                &lt;/ListView.itemTemplate&gt;
            &lt;/ListView&gt;

            &lt;TextField text="{{ messageToSend }}" hint="{{ L('chat', 'text_hint') }}" row="3" returnPress="{{ send }}"/&gt;
            &lt;Button text="{{ L('chat', 'send_btn') }}" class="footer-grey-button-wrapper footer-grey-button"
                    tap="{{ send }}" col="0" row="4"/&gt;

        &lt;/GridLayout&gt;

&lt;/Page&gt;
</code></pre>