Available for iOS 13+, macOS 10.15+, and tvOS 13+.
SwiftUI
RoundedRectangle(cornerRadius: 15, style: .continuous)
Core Animation / UIKit / AppKit
view.layer.cornerRadius = 15
view.layer.cornerCurve = .continuous
Available for iOS 13+, macOS 10.15+, and tvOS 13+.
RoundedRectangle(cornerRadius: 15, style: .continuous)
view.layer.cornerRadius = 15
view.layer.cornerCurve = .continuous