Post

Replies

Boosts

Views

Activity

Text Max Character Number SwiftUI
Hi, Some times long text damage the design of views it might go to a second row and increase view height and damage the overall design, so how to solve this issue, is there a way to set a Max Characters number for Text and TextField views in SwiftUI ? and maybe show few dots as used in some designs ? Kind Regards
1
0
247
Sep ’24
One to Many Relationship in SwiftData
Hi, I understand how to make one to many relationship in SwiftData and how to show the child records, like all cities of a country. But how to navigate and show the parent record from a child record, Like I want to show a country of a city ? like country.cities show all cities of a country, will cities.country work to show the country ? like cities.country.name ? Kind Regards
3
0
210
Sep ’24
Center Aligning SF Symbols in Sidebar Menu
Hi, When watching SF Symbols WWDC videos about SF Symbols the recommendations is always to center align them, but suppose we are making sidebar menu items where we have VStack of HStacks , and each Stack have an SF Symbol and a text in this case how can SF Symbols be center aligned ? they will mostly right aligned so will this damage the design ? specially if they have like badges ? -- Kind Regards
0
0
351
Jul ’24
Text Don't Show in swipeActions buttons !
Hi, I have the below code and don't know why the text doesn't show fro swipe buttons just the icons show ? Kind Regards import SwiftUI struct NewView: View { var body: some View { NavigationStack { List { ForEach(1...7, id: \.self) { number in VStack { Text("Item \(number)") .padding() } .swipeActions(edge: .trailing) { Button(role: .destructive) { withAnimation { deletePatient2() } } label: { Label("Delete", systemImage: "trash.fill") } Button { deletePatient2() // toDoToEdit = item } label: { Label("Edit", systemImage: "pencil") } .tint(.orange) } } } } .listStyle(.plain) } func deletePatient2() { } } #Preview { NewView() }
3
0
440
Jul ’24
Views Autopsy in SwiftUI
Hi, How to see a views Autopsy in SwiftUI specially when views stacks together and over each other, like to see what area they occupy how they overlap understand why white space is here and there ? Maybe there's a tool or plug in ? I remember layers in UIKit, had such tool and feature in Xcode. Kindest Regards
0
0
300
Feb ’24