ALSpotlightView 是焦点视图控制,使用 Swift 实现。
//-- Initializing a spotlight view (shortest initialization): let spotlightView = ALSpotlightView(spotlightCenter: CGPoint(x: 0.5, y: 0,5)) //-- Setting a tap handler (to hide when tapped) spotlightView.onTapHandler = { spotlightView.hide } //-- Presenting the spotlight view: spotlightView.show()