SASecretCommandViewController 是使用 Swift 所写,通过手势的拨动和按钮来激活。手指按钮的隐藏指令可以自定义。感觉就是有点开启秘籍那样,比较有趣。拨动的时候视图中会出现方向指示。 [Code4App.com]
示例:
class ViewController: SASecretCommandViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. // Register secret command with SASecretCommandType let commandList: [SASecretCommandType] = [ .Up, .Up, .Down, .Down, .Left, .Right, .Left, .Right, .B, .A ] self.registerSecretCommand(commandList) //Show inpunt command as icon self.showInputCommand = true } }