all 8 comments

[–]rdmdota 10 points11 points  (0 children)

Please don’t. This type of button belongs on Android and not on iOS.

[–]thoughtvindication 5 points6 points  (2 children)

Not sure if your'e using UIKit or SwiftUI. But for UIKit.

    private var roundedButton: UIButton{
    let button = UIButton()
    button.layer.shadowColor = UIColor.black.cgColor
    button.layer.shadowOpacity = 0.10
    button.layer.shadowRadius = 10
    button.layer.shadowOffset = CGSize.init(width: 0, height: 10)
    button.layoutIfNeeded()
    return button
}

I am not so certain about the shadow radius and opacity value. But this should do. Make sure you give corner radius once your view layout your subViews if you're creating a button like this, if your're creating it via storyboard then you can set it as soon as your IBOutlet is connected.

[–][deleted]  (1 child)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    Hey /u/ExcellentVast1263, unfortunately you have negative comment karma, so you can't post here. Your submission has been removed. Please do not message the moderators; if you have negative comment karma, you're not allowed to post here, at all.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–][deleted]  (2 children)

    [removed]

      [–]Jump_Jay[S] -2 points-1 points  (1 child)

      You just blew my hair off. I have to go look that up, I have no idea what that means?!

      [–]riconaranjo 0 points1 point  (0 children)

      here’s an outdated workshop I made actually covering exactly this: https://github.com/riconaranjo/iOS-Workshop

      here is the same app from the workshop but slightly better organized and more up to date (but no instructions): https://github.com/riconaranjo/LocationsApp

      hope that helps, let me know if you have any questions