title: iMessage apps keeps getting restarted
body: <p>Whenever I swipe outside of my iMessage app to open another iMessage app, and then come back to my iMessage app by swiping back, my iMessage app gets loaded again.</p>
  
  <p>Even <code>viewDidLoad</code> of <code>MessagesViewController</code> gets called again.</p>
  
  <p>My code in <code>MessagesViewController</code> looks like-</p>
  
  <pre><code>class MessagesViewController: MSMessagesAppViewController {
  
      override func viewDidLoad() {
          super.viewDidLoad()
          openSuitableController()
      }
  
      override func willTransition(to presentationStyle: MSMessagesAppPresentationStyle) {
          removeAllChildViewControllers()
      }
  
      override func didTransition(to presentationStyle: MSMessagesAppPresentationStyle) {
          openSuitableController()
      }
  }
  </code></pre>
  
  <p>In <code>openSuitableController</code>, I just add a <code>childViewController</code> to <code>MessagesViewController</code>.</p>
  
  <p>Because the apps start again, the <code>collectionView</code> gets loaded and scrolled to the top and it leads to flickering.</p>
  
  <p>Please do comment if you need more info.</p>
  
  <p>PS: I have added <code>Objective-C</code> tag because I don't feel this problem is due to specific language.</p>