Thursday, April 30, 2026
HomeiOS Developmentios - Learn how to take away gentle overlay over my Button...

ios – Learn how to take away gentle overlay over my Button in SwiftUI?

[ad_1]

As you may see on the picture under there may be gentle overlay over my rounded button. I dont know why. Are you able to assist me with this? I spent three hours on this with out success.

enter image description here

Right here is the code:

struct TimerView: View {
    non-public var mode: WatchMode {
        WatchOptions.shared.modes[0]
    }
    var physique: some View {
        VStack(alignment: .heart, spacing: 20) {
            Textual content("HellonMyApp")
                .foregroundColor(Coloration(mode.baseBackgroundColor))
                .font(.liberationMonoRegular(withSize: 23))
                .multilineTextAlignment(.heart)
            Button {
                print("Picture tapped!")
            } label: {
                Picture("icon-play")
            }
            .body(width: 70, top: 70)
            .background(Coloration(mode.baseBackgroundColor))
            .foregroundColor(Coloration(mode.baseTextColor))
            .contentShape(Circle())
            .clipShape(Circle())
        }
    }
}

Each clipShape and contentShape are to keep away from detecting faucets out of circle.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments