ESTabBarController icon indicating copy to clipboard operation
ESTabBarController copied to clipboard

Mouse cursor flies up to top when hovering ESTabBarItem

Open shimastripe opened this issue 5 years ago • 1 comments

I checked an example app in this repostiory. Please check.

test

iPad OS Supports mouse cursor. When hovering UITabBarItem, the cursor surrounds UITabBarItem. But in the case of ESTabBarItem, the cursor flies up.

shimastripe avatar May 30 '20 13:05 shimastripe

I use the following code to solve this problem.

class YourTabBarController: ESTabBarController {
    
    init() {
        super.init(nibName: nil, bundle: nil)

        if #available(iOS 13.4, *) {
            view.subviews.forEach({
                $0.addInteraction(UIPointerInteraction(delegate: self))
            })
            tabBar.addInteraction(UIPointerInteraction(delegate: self))
        }
    }
}

@available(iOS 13.4, *)
extension YourTabBarController: UIPointerInteractionDelegate {
    func pointerInteraction(_ interaction: UIPointerInteraction, styleFor region: UIPointerRegion) -> UIPointerStyle? {
        return nil
    }
}

conscientiousness avatar Jun 20 '20 04:06 conscientiousness