Your First iOS & SwiftUI App: Polishing the App, Episode 2: More View Modifiers |

Learn about more view modifiers including padding, foregroundColor, background, and cornerRadius, and use those to style the “Hit Me” button in Bull’s Eye.

This is a companion discussion topic for the original entry at

I have made my button like below.
Button(“Hit me”) {
alertIsVisible = true

However, I can’t find out how to change the font inside the button.
Could you teach me the solution?


I am having the same problem, it won’t let me put any modifiers on the text no matter where I put them (neither before the curly braces nor within them). I’ve tried turning to Google but it’s also not turning up any answers.

1 Like

I’m also trying to find how to change it to bold but it’s not allowing me. My code is blow.

Button("Hit Me") {
    print("Button Pressed")
    alartIsVisible = true