shapes in swiftui
struct ContentView: View {
var body: some View {
ZStack {
Rectangle()
.fill(Color.black)
.frame(width: 200, height: 200)
RoundedRectangle(cornerRadius: 25, style: .continuous)
.fill(Color.red)
.frame(width: 200, height: 200)
Capsule()
.fill(Color.green)
.frame(width: 100, height: 50)
Ellipse()
.fill(Color.blue)
.frame(width: 100, height: 50)
Circle()
.fill(Color.white)
.frame(width: 100, height: 50)
}
}
}
Also in Swift:
- swift filter array
- add top corner radius swift
- change font swiftui
- swift close app
- custom binding swiftui
- swift initialize array with size
- swift share with
- check enumatted arrray last item swift
- UIFont.init bold
- swift function in a variable
- remove back button text nav bar swift
- rotate image animated swift
- swift thread.sleep
- how to get list of value from specific keys in array object in swift
- playing a sound in swift
- round down swift
- how to get appdelegate object in swift
- swift textfield trim special characters before database
- swift ns_enum generic name
- swift VStack
- how to darken view swiftui
- swift func for constraint
- round up swift
- get device name swift