 
     private func reset() {
 
-        if !isOrientationChange {
+        if !isLayoutingSubviews {
             currentIndex = 0
         }
 

    }

    public func willChangeOrientation() {
        isOrientationChange = true
    }

    fileprivate func update(from fromIndex: Int, to toIndex: Int) {

        if !isOrientationChange {
            delegate?.swipeMenuView(self, willChangeIndexFrom: fromIndex, to: toIndex)
        }


    }

    open override func layoutSubviews() {

        isLayoutingSubviews = true
        super.layoutSubviews()

        reloadData(isOrientationChange: true)
