上QQ阅读APP看书,第一时间看更新
Including glow effects on buttons
Adding glow effects to buttons is a good way of calling attention to them and differentiating them from other buttons on your app's interface.
How to do it...
To include glow effects, perform the following steps:
- Drag a button to your card.
- Right-click on the button and select Property Inspector.
- On the property inspector, select Graphic Effects from the pull-down menu (Basic Properties is the default selection).
- Select the type of glow you desire (inner or outer).
- Set the properties associated with the outer glow as detailed in the following table:
The following screenshot gives you an overview of these properties:
- Set the properties associated with the inner glow as detailed in the following table:
The following screenshot gives you an overview of these properties:
How it works...
By using the Graphic Effects section of the property inspector, we can easily change the outer and inner glow properties for buttons. We can also do this programmatically by directly referencing the property reference name. For example, to change the opacity of a button, we simply use the following code:
set the opacity of btn "myButton" to 119