From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

New UIButton tricks

New UIButton tricks

- [Instructor] When discussing Xcode 13 features, I mentioned UIButton configuration. UI buttons got a lot of attention that's been reserved for SwiftUI. Much of the hard work of making buttons is a lot easier with a few new and exciting additions. The exercise file I set up has a UI stack view of buttons that you can see right here. I used a small trick to simulate a SwiftUI spacer by adding a blank UI view to act as a spacer. And I've added some actions for us to work with up here. So we're going to start with this old style button here. And this is what you'd normally expect from a button that you just set it to type system, and set the title for normal, and go ahead and run it, and put it into the arranged sub-view. So that's pretty straightforward. I'm going to run this. And we get our old-fashioned button, which is just this little text here. And I don't even have any action set to it. So we're going to stop that.…

Contents