title: SAPUI5- How to hide a button/region/area when a button is pressed?
body: <p>I want to hide a button/area/region(header,footer,etc) when a button is clicked. How can I achieve this?
  For example if I have the following page:</p>
  
  <pre><code>   &lt;mvc:View
       height="100%"
       xmlns:mvc="sap.ui.core.mvc"
     xmlns="sap.m"&gt;
       &lt;Page
           title="Hide Area On Button Click" &gt;
               &lt;content&gt;
               &lt;Button  id="btn1" text="Accept" type="Accept" press="onPress" /&gt;
               &lt;Button id="btn2" text="Reject" type="Reject" /&gt;
            &lt;/content&gt;
            &lt;footer&gt;
  
            &lt;/footer&gt;
      &lt;/Page&gt;
  &lt;/mvc:View&gt;
  </code></pre>
  
  <p>Now what should be the </p>
  
  <pre><code>onPress : function {//code}
  </code></pre>
  
  <p>to hide the reject button?</p>