                 contentOffset.y = -requiredContentInset.top
                 scrollView.contentOffset = contentOffset
             }
+        }
+    }
+    
+    /// Check whether a view controller is not an 'embedded' view controller type (i.e. UITableViewController)
+    ///
+    /// - Parameters:
+    ///   - viewController: The view controller.
+    ///   - success: Execution if view controller is not embedded type.
+    private func checkIsNotEmbeddedViewController(_ viewController: UIViewController, _ success: () -> Void) {
+        if !(viewController is UITableViewController) && !(viewController is UICollectionViewController) {
+            success()
         }
     }
 }

            requiredContentInset.right = currentContentInset.right
            
            // ensure scroll view is either at top or full height before doing automatic insetting
            if requiredContentInset.top > 0.0 {
                guard scrollView.frame.minY == 0.0 else { continue }
            }
            if requiredContentInset.bottom > 0.0 {
                guard let scrollViewSuperview = scrollView.superview, scrollViewSuperview.bounds.maxY - scrollView.frame.maxY == 0.0 else { continue }
            }
            
            // dont update if we dont need to
            if scrollView.contentInset != requiredContentInset {
                
                scrollView.contentInset = requiredContentInset
                scrollView.scrollIndicatorInsets = requiredContentInset
                

        var scrollViews = [UIScrollView?]()
        if let tableViewController = childViewController as? UITableViewController { // UITableViewController
            scrollViews.append(tableViewController.tableView)
        } else if let collectionViewController = childViewController as? UICollectionViewController { // UICollectionViewController
            scrollViews.append(collectionViewController.collectionView)
        } else if let subviews = childViewController.view?.subviews { // standard subview filtering
            scrollViews.append(contentsOf: subviews.map({ $0 as? UIScrollView }))
        }
