         }
     }
     
-    /// if you need get parent viewController from viewPager's viewController, pass into the bmoViewPager's owner
+    /**
+     if you need get parent view controller from viewPager's view controller, pass into the bmoViewPager's owner
+     if the parent view controller as same as the datasource, it will autoset to bmoViewPager's parent view controller
+     */
     public weak var parentViewController: UIViewController? {
         didSet {
-            parentViewController?.addChildViewController(pageViewController)
-            pageViewController.didMove(toParentViewController: parentViewController)
+            if let vc = parentViewController {
+                vc.addChildViewController(pageViewController)
+                pageViewController.didMove(toParentViewController: vc)
+            }
         }
     }
     

    @objc optional func bmoViewPagerDelegate(_ viewPager: BmoViewPager, scrollProgress fraction: CGFloat, index: Int)
    @objc optional func bmoViewPagerDelegate(_ viewPager: BmoViewPager, didAppear viewController: UIViewController, page: Int)
}
public class BmoViewPager: UIView, BmoPageItemListDelegate, UIScrollViewDelegate {
    @IBInspectable var isHorizontal: Bool = true
    

    }
    public weak var dataSource: BmoViewPagerDataSource? {
        didSet {
            self.parentViewController = (dataSource as? UIViewController)
            pageViewController.bmoDataSource = dataSource
            pageListView.bmoDataSource = dataSource
            self.addPageListIfNeed()
