title: Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy?
body: <p>I adding tableView on viewController.
  When I open this screen, then I will get the below warning once.</p>
  <blockquote>
  <p>[TableView] Warning once only: UITableView was told to layout its
  visible cells and other contents without being in the view hierarchy
  (the table view or one of its superviews has not been added to a
  window). This may cause bugs by forcing views inside the table view to
  load and perform layout without accurate information (e.g. table view
  bounds, trait collection, layout margins, safe area insets, etc), and
  will also cause unnecessary performance overhead due to extra layout
  passes. Make a symbolic breakpoint at
  UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the
  debugger and see what caused this to occur, so you can avoid this
  action altogether if possible, or defer it until the table view has
  been added to a window. Table view: &lt;UITableView: 0x7fe2ba8d5a00;
  frame = (-47 -80; 394 553); clipsToBounds = YES; autoresize = RM+BM;
  gestureRecognizers = &lt;NSArray: 0x600003447480&gt;; layer = &lt;CALayer:
  0x600003aa2be0&gt;; contentOffset: {0, 0}; contentSize: {394, 176};
  adjustedContentInset: {0, 0, 0, 0}; dataSource:
  &lt;Project.MondayToSundayViewController: 0x7fe2b9da05c0&gt;&gt;</p>
  </blockquote>
  <p>When added symbolic breakpoint for UITableViewAlertForLayoutOutsideViewHierarchy then below is shown in the console.</p>
  <pre><code>&gt; UIKitCore`UITableViewAlertForLayoutOutsideViewHierarchy:
  -&gt;  0x7fff48260c7e &lt;+0&gt;:   pushq  %rbp
      0x7fff48260c7f &lt;+1&gt;:   movq   %rsp, %rbp
      0x7fff48260c82 &lt;+4&gt;:   pushq  %r14
      0x7fff48260c84 &lt;+6&gt;:   pushq  %rbx
      0x7fff48260c85 &lt;+7&gt;:   subq   $0x30, %rsp
      0x7fff48260c89 &lt;+11&gt;:  callq  *0x3e51a6a1(%rip)         ; (void *)0x00007fff51411350: objc_retain
      0x7fff48260c8f &lt;+17&gt;:  movq   %rax, %rbx
      0x7fff48260c92 &lt;+20&gt;:  leaq   0x416a8dbf(%rip), %rdi    ; _UIInternalPreference_UITableViewEnableAlertForLayoutOutsideViewHierarchy
      0x7fff48260c99 &lt;+27&gt;:  leaq   0x3e5a2140(%rip), %rsi    ; @&quot;UITableViewEnableAlertForLayoutOutsideViewHierarchy&quot;
      0x7fff48260ca0 &lt;+34&gt;:  callq  0x7fff482a7529            ; _UIInternalPreferenceUsesDefault
      0x7fff48260ca5 &lt;+39&gt;:  testb  %al, %al
      0x7fff48260ca7 &lt;+41&gt;:  jne    0x7fff48260cb3            ; &lt;+53&gt;
      0x7fff48260ca9 &lt;+43&gt;:  movb   0x416a8dad(%rip), %al     ; _UIInternalPreference_UITableViewEnableAlertForLayoutOutsideViewHierarchy + 4
      0x7fff48260caf &lt;+49&gt;:  andb   $0x1, %al
      0x7fff48260cb1 &lt;+51&gt;:  je     0x7fff48260d2d            ; &lt;+175&gt;
      0x7fff48260cb3 &lt;+53&gt;:  leaq   0x416c3ffe(%rip), %rax    ; _UIApplicationLinkedOnVersion
      0x7fff48260cba &lt;+60&gt;:  movl   (%rax), %eax
      0x7fff48260cbc &lt;+62&gt;:  testl  %eax, %eax
      0x7fff48260cbe &lt;+64&gt;:  je     0x7fff48260d3e            ; &lt;+192&gt;
      0x7fff48260cc0 &lt;+66&gt;:  cmpl   $0xd0000, %eax            ; imm = 0xD0000 
      0x7fff48260cc5 &lt;+71&gt;:  jb     0x7fff48260d2d            ; &lt;+175&gt;
      0x7fff48260cc7 &lt;+73&gt;:  movq   %rbx, %rdi
      0x7fff48260cca &lt;+76&gt;:  callq  0x7fff486252fa            ; symbol stub for: objc_opt_class
      0x7fff48260ccf &lt;+81&gt;:  movq   0x41607402(%rip), %rsi    ; &quot;_isInternalTableView&quot;
      0x7fff48260cd6 &lt;+88&gt;:  movq   %rax, %rdi
      0x7fff48260cd9 &lt;+91&gt;:  callq  *0x3e51a641(%rip)         ; (void *)0x00007fff513f7780: objc_msgSend
      0x7fff48260cdf &lt;+97&gt;:  testb  %al, %al
      0x7fff48260ce1 &lt;+99&gt;:  jne    0x7fff48260d2d            ; &lt;+175&gt;
      0x7fff48260ce3 &lt;+101&gt;: movq   0x3e519b46(%rip), %rax    ; (void *)0x00007fff89ea06a0: _NSConcreteStackBlock
      0x7fff48260cea &lt;+108&gt;: movq   %rax, -0x38(%rbp)
      0x7fff48260cee &lt;+112&gt;: movl   $0xc2000000, %eax         ; imm = 0xC2000000 
      0x7fff48260cf3 &lt;+117&gt;: movq   %rax, -0x30(%rbp)
      0x7fff48260cf7 &lt;+121&gt;: leaq   0x46728(%rip), %rax       ; __UITableViewAlertForLayoutOutsideViewHierarchy_block_invoke
      0x7fff48260cfe &lt;+128&gt;: movq   %rax, -0x28(%rbp)
      0x7fff48260d02 &lt;+132&gt;: leaq   0x3e51d237(%rip), %rax    ; __block_descriptor_40_e8_32s_e5_v8?0l
      0x7fff48260d09 &lt;+139&gt;: movq   %rax, -0x20(%rbp)
      0x7fff48260d0d &lt;+143&gt;: movq   %rbx, %rdi
      0x7fff48260d10 &lt;+146&gt;: callq  *0x3e51a61a(%rip)         ; (void *)0x00007fff51411350: objc_retain
      0x7fff48260d16 &lt;+152&gt;: movq   %rax, -0x18(%rbp)
      0x7fff48260d1a &lt;+156&gt;: cmpq   $-0x1, 0x416ca5c6(%rip)   ; _UIInternalPreference_TableViewReorderingUsesDragAndDrop_block_invoke_10.__s_category + 7
      0x7fff48260d22 &lt;+164&gt;: jne    0x7fff48260d52            ; &lt;+212&gt;
      0x7fff48260d24 &lt;+166&gt;: movq   %rax, %rdi
      0x7fff48260d27 &lt;+169&gt;: callq  *0x3e51a5fb(%rip)         ; (void *)0x00007fff51411000: objc_release
      0x7fff48260d2d &lt;+175&gt;: movq   %rbx, %rdi
      0x7fff48260d30 &lt;+178&gt;: addq   $0x30, %rsp
      0x7fff48260d34 &lt;+182&gt;: popq   %rbx
      0x7fff48260d35 &lt;+183&gt;: popq   %r14
      0x7fff48260d37 &lt;+185&gt;: popq   %rbp
      0x7fff48260d38 &lt;+186&gt;: jmpq   *0x3e51a5ea(%rip)         ; (void *)0x00007fff51411000: objc_release
      0x7fff48260d3e &lt;+192&gt;: movl   $0xd0000, %edi            ; imm = 0xD0000 
      0x7fff48260d43 &lt;+197&gt;: callq  0x7fff48093724            ; _UIApplicationLinkedOnOrAfter
      0x7fff48260d48 &lt;+202&gt;: testb  %al, %al
      0x7fff48260d4a &lt;+204&gt;: jne    0x7fff48260cc7            ; &lt;+73&gt;
      0x7fff48260d50 &lt;+210&gt;: jmp    0x7fff48260d2d            ; &lt;+175&gt;
      0x7fff48260d52 &lt;+212&gt;: leaq   0x416ca58f(%rip), %rdi    ; UITableViewAlertForLayoutOutsideViewHierarchy.once
      0x7fff48260d59 &lt;+219&gt;: leaq   -0x38(%rbp), %r14
      0x7fff48260d5d &lt;+223&gt;: movq   %r14, %rsi
      0x7fff48260d60 &lt;+226&gt;: callq  0x7fff48624f8e            ; symbol stub for: dispatch_once
      0x7fff48260d65 &lt;+231&gt;: movq   0x20(%r14), %rax
      0x7fff48260d69 &lt;+235&gt;: jmp    0x7fff48260d24            ; &lt;+166&gt;
  </code></pre>
  <p>Can you please help me to remove the warning?</p>