
上QQ阅读APP看书,第一时间看更新
Calling functions on the button state change
In this recipe, we will learn how to call a function when the state of a button has changed. It is a common requirement that you only want an action to be performed when a button has a state change, as opposed to while the button is pushed down. This recipe demonstrates one technique that you can use to implement this requirement in your project.