![]() filled: A button whose background is filled with a color. plain: A plain button with a transparent background. They come as four different functions on UIButton.Configuration that generate a configuration object based on that template. ![]() Fortunately, this is easy to fix with the new Configuration API!Īt a high level, there are four primitive options for a button configuration. This opens the SignInViewController view controller. Beginning Adoption of UIButton.Configurationīuild and run the starter project. SET BUTTON TEXT CUSTOM COLOR SWIFT HOW TONow you’ll learn how to use the Configuration API to take your button’s styles to the next level with ease. If you’ve used a completion handler-based API before, this new UIAction API should feel familiar. ![]() When tapping the button, the block will be called and the print statement will execute. Here’s a brief example of how to use this API: Read on to discover everything you need to know to start configuring buttons! Getting Startedĭownload the starter project by clicking the Download Materials button at the top or bottom of the tutorial.Ī quick refresher: In iOS 14, Apple introduced the UIAction API for UIButton, which removed the need for the target-action pattern. Update a button’s configuration dynamically.More specifically, you’ll learn how to do the following with the UIButton Configuration API: This API provides a flexible way to declare the style of buttons and have that style change when the state changes. In this tutorial, you’ll learn how to take your app’s buttons to the next level using the UIButton Configuration API introduced in iOS 15. Buttons are a staple of all apps, big and small.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |