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
882
Sep ’24
Using truncationMode
Hi, The example that Apple shows in link below doesn't show how truncationMode works, because the text get truncated anyway when its length it more than frame height so what's the use of truncationMode ? https://developer.apple.com/documentation/swiftui/view/truncationmode(_:) -- Kind Regards
1
0
319
Sep ’24
SwiftUI List hidden line separator not working
Hi, I have the below code as you can see the list doesn't hide its line separator, so is it a bug ? is there any work around ? @State var flag: Bool = false var myList: [String] = ["Hello", "World", "SwiftUI"] var body: some View { VStack(alignment: .leading) { List (myList, id: \.self) { list in Text(list) } .listRowSeparator(.hidden) .listStyle(.plain) } .overlay( RoundedRectangle(cornerRadius: 10) .stroke(sysSecondary.opacity(0.4), lineWidth: 1) ) .frame(width: 220, height:260) .background(.white) .clipShape (RoundedRectangle (cornerRadius: 10)) } }
Topic: UI Frameworks SubTopic: SwiftUI
1
0
425
Sep ’24
Customizing ToolBar of SplitView
Hi, Os to possible to customize the icon, color, positioning of the SplitView ToolBar that shows at details view, the menu blue icon. add buttons to it ? change its color, icon, size ? position like adding paddings ? Kind Regards
1
0
623
Oct ’24
Using Generics with SwiftData Models and Bindable
Hi, When passing a SwftData Module to a view that receives it in a @Binadable property variable I get an error that it doesn't conform to Observation, I don't know how to solve this issue, even adding @Observable type to the generic in the structure definition won't solve it, any suggestions ? Kind Regards
1
0
518
Nov ’24
SwifttData Record Update
Hi When connecting a SwiftData module property to a SwiftUI view such as a text field and the field changes by user the property get updated in the SwiftData database, now suppose I want to run a validation code or delay updates to Database till use click a submit button how to do that ? delay those auto updates if we can name it ? Kind Regards Code Example import SwiftUI import SwiftData struct GListSel2: View { @Bindable var patient: Patient var body: some View { HStack { TextField("Gender", text: $patient.gender) } } }
1
0
361
Nov ’24
Initializing NavigationStack
Hi, NavigationStack is a struct so to initialize it we need to use var or let so how come we use it without this keywords ? Kindest Regards
Replies
1
Boosts
0
Views
399
Activity
Nov ’23
Reducing default space between tool bar items
Hi, How to reducing default space between tool bar items, it seems little to much. Kindest Regards
Replies
1
Boosts
0
Views
463
Activity
Jan ’24
Removing source control repository from specific Xcode project
Hi, I added local source control for a project and I want to remove it how to do that ? disabling source control from Xcode settings will hide source control from other projects which I don't want, just removing this specific project from source control and deleting the repository . Kindest Regards
Replies
1
Boosts
0
Views
1.1k
Activity
Jan ’24
Deleting a post
Hi, How to delete a post from Apple Developer Forum ? Kindest Regards
Replies
1
Boosts
0
Views
928
Activity
Jan ’24
Making Dropdown Picker or Menu Open Down
Hi, Menus and pickers in iOS and iPadOS opens toward, can it be configured to open downward ? For example if I have country list opening upwards won't be good, Kind Regards
Topic: UI Frameworks SubTopic: SwiftUI
Replies
1
Boosts
0
Views
423
Activity
Jul ’24
Baseline Align SF Symbols and Text
Hi, When putting an image that uses systemName next to a text will they be baseline aligned by default ? -- Kindest Regards
Topic: Design SubTopic: General Tags:
Replies
1
Boosts
0
Views
646
Activity
Aug ’24
Failed to find a currently active container for "Module Name"
Hi, I had a SwiftData model and it was working fine, I had few records in it, but when I added to its Module file few extra properties I started to get the below error ! how to fix this ? "Thread 1: Fatal error: failed to find a currently active container for Patient"
Replies
1
Boosts
0
Views
1.3k
Activity
Aug ’24
Inserting array of model objects using modelContext
Hi, I saw many examples on how to insert one model object at a time in SwiftData using modelContext.insert() , but can that command insert an array of objects in one batch as well ? -- Kind Regards
Replies
1
Boosts
0
Views
608
Activity
Sep ’24
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
Replies
1
Boosts
0
Views
882
Activity
Sep ’24
Using truncationMode
Hi, The example that Apple shows in link below doesn't show how truncationMode works, because the text get truncated anyway when its length it more than frame height so what's the use of truncationMode ? https://developer.apple.com/documentation/swiftui/view/truncationmode(_:) -- Kind Regards
Replies
1
Boosts
0
Views
319
Activity
Sep ’24
SwiftUI List hidden line separator not working
Hi, I have the below code as you can see the list doesn't hide its line separator, so is it a bug ? is there any work around ? @State var flag: Bool = false var myList: [String] = ["Hello", "World", "SwiftUI"] var body: some View { VStack(alignment: .leading) { List (myList, id: \.self) { list in Text(list) } .listRowSeparator(.hidden) .listStyle(.plain) } .overlay( RoundedRectangle(cornerRadius: 10) .stroke(sysSecondary.opacity(0.4), lineWidth: 1) ) .frame(width: 220, height:260) .background(.white) .clipShape (RoundedRectangle (cornerRadius: 10)) } }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
1
Boosts
0
Views
425
Activity
Sep ’24
Manually Opening SideBar in SplitView as Popover
Hi, If Im in detailsOnly mode in SplitView how to manually open the SideBar as popover same as behavior as default rectangle menu icon at top of Details View. Kind Regards
Replies
1
Boosts
0
Views
314
Activity
Oct ’24
Customizing ToolBar of SplitView
Hi, Os to possible to customize the icon, color, positioning of the SplitView ToolBar that shows at details view, the menu blue icon. add buttons to it ? change its color, icon, size ? position like adding paddings ? Kind Regards
Replies
1
Boosts
0
Views
623
Activity
Oct ’24
Using Generics with SwiftData Models and Bindable
Hi, When passing a SwftData Module to a view that receives it in a @Binadable property variable I get an error that it doesn't conform to Observation, I don't know how to solve this issue, even adding @Observable type to the generic in the structure definition won't solve it, any suggestions ? Kind Regards
Replies
1
Boosts
0
Views
518
Activity
Nov ’24
SwifttData Record Update
Hi When connecting a SwiftData module property to a SwiftUI view such as a text field and the field changes by user the property get updated in the SwiftData database, now suppose I want to run a validation code or delay updates to Database till use click a submit button how to do that ? delay those auto updates if we can name it ? Kind Regards Code Example import SwiftUI import SwiftData struct GListSel2: View { @Bindable var patient: Patient var body: some View { HStack { TextField("Gender", text: $patient.gender) } } }
Replies
1
Boosts
0
Views
361
Activity
Nov ’24