swiftmacosuikitmac-catalyst

Blue Highlighting / Focus Ring on Catalyst App


I'm currently in the process of porting my iOS app to macOS using Project Catalyst.

All of my text fields, text views and table views have a blue outline when active.

I've noticed it in Apple Catalyst apps (e.g. News) in recent betas so I'm hoping it's just a bug.

Has anyone found any way to remove it otherwise?


Solution

  • In swift you can do

    
    extension UITextView {
        #if targetEnvironment(macCatalyst)
        @objc(_focusRingType)
        var focusRingType: UInt {
            return 1 //NSFocusRingTypeNone
        }
        #endif
    }