     public func scrollViewDidEndScrollingAnimation(scrollView: UIScrollView) {
         isEndAnimationByToolBar = true
     }
-    
-    // MARK: - device rotation
-    @objc private func changeOrientation() {
-        //        setControlsHidden(true, animated: false, permanent: false)
-        // FIXME: - when we will to resolve this problem https://github.com/suzuki-0000/SKPhotoBrowser/issues/22  it will need to remove
-        deleteButtonShowFrame = CGRect(x: view.frame.width - 44, y: 5, width: 44, height: 44)
-        deleteButtonHideFrame = CGRect(x: view.frame.width - 44, y: -20, width: 44, height: 44)
-    }
 }
 
 extension UIView

    public var customCloseButtonHideFrame: CGRect!
    public var customCloseButtonImage: UIImage!
    public var customCloseButtonEdgeInsets: UIEdgeInsets!
    private var customCloseButtonHideOldFrame: CGRect!
    private var customCloseButtonShowOldFrame: CGRect!
    
    // MARK: CustomDeleteButton
    private var customDeleteButton: UIButton!

        pagingScrollView.frame = frameForPagingScrollView()
        pagingScrollView.contentSize = contentSizeForPagingScrollView()

      
        frameForButton()
        //If we open the SKPhotoBrowser from CollectionView not the first image, we have one element in visiblepages and we should to take 0 element from visibleindex but that we should to use frame we should use currentPageIndex for frame's functions.
        // TODO: - need to fix this bug
        /*if visiblePages.count > 0 {
