skip to Main Content

Ios swift – How do I create a bottom border for a Rectangle with cornerRadius in SwiftUI?

I want text field bottom border as the below design My Code ZStack { RoundedRectangle(cornerRadius: 6) .fill(LinearGradient(colors: [Color("#B37CFA").opacity(0.5),Color("#2A5389").opacity(0.5),Color("#2DB854").opacity(0.5)], startPoint: .leading, endPoint: .trailing)) .frame(height: 50) .mask( Rectangle() .frame(height: 20) .cornerRadius(10, corners: [.bottomLeft, .bottomRight]) ) } Output

VIEW QUESTION

Ios swift – iOS 17 Interactive Widget – How to change background color of Button with Custom Label view, in SwiftUI widget?

Currently, I have the following SwiftUI widget. struct TodoWidgetEntryView : View { var entry: Provider.Entry let todoItems: [TodoItem] = DataManager().todoItems var body: some View { VStack(alignment: .leading, spacing: 1) { ForEach(0..<todoItems.count, id: .self) { index in Button(intent: TodoIntent(item: todoItems[index].taskName)) {…

VIEW QUESTION
Back To Top
Search