title: Nativescript iOS HtmlView in ScrollView not resizing
body: <p>I have been trying to solve this problem for the past few days and I'm just not finding the solution. I have a Nativescript application that loads documents stored on a webAPI server. These documents are long, html documents. As such, I have wrapped the HtmlView tag with a scrollview (WebView won't work in this case as I need to put some buttons at the bottom of the scroll for the customer to sign the document). This works fine on Android, but on iOS, the scroll view doesn't expand to show the entire content until the user rotates their device. Then it will scroll and view everything just fine.</p>
  
  <p>home.component.ts</p>
  
  <pre><code>import { Component, OnInit } from "@angular/core";
  import { DocumentService } from "~/home/service/document.service";
  import { IDocument, Document } from "~/home/service/document";
  @Component({
      selector: "Home",
      moduleId: module.id,
      templateUrl: "./home.component.html"
  })
  export class HomeComponent implements OnInit {
  
      constructor(
          private service: DocumentService,) {
          // Use the component constructor to inject providers.
      }
  
      private document = new Document();
      private text = '';
  
      ngOnInit() {
          this.text = `&lt;div&gt;Retrieving Document...&lt;/div&gt;`;
      }
  
      ngAfterViewInit(): void {
          this.service.getById('WEB-0000063',3)
                      .then((data: IDocument) =&gt; {
                          if (data) {
                              this.document = data;
                              this.text = `&lt;!DOCTYPE&gt;&lt;html&gt;&lt;body&gt;${this.document.Body}&lt;/body&gt;&lt;/html&gt;`;
                          }
                      });
      }
  
  }
  </code></pre>
  
  <p>home.component.html</p>
  
  <pre><code>&lt;GridLayout class="page"&gt;
      &lt;GridLayout rows="*" cols="*" height="100%"&gt;
          &lt;ScrollView row="0" height="100%"&gt;
              &lt;StackLayout height="100%"&gt;
                  &lt;HtmlView [html]="text"&gt;&lt;/HtmlView&gt;
              &lt;/StackLayout&gt;
          &lt;/ScrollView&gt;
      &lt;/GridLayout&gt;
  &lt;/GridLayout&gt;
  </code></pre>
  
  <p>If I hard-code the data, it works fine, but when it comes back from the server, it has the problem, but only on iOS.</p>
  
  <p>Any help is appreciated.</p>