Hi,
When creating a 3 columns Split View in SwiftUI the second view that resemble the mails list in Apple Mails App have a blue icon at top left corner where when tapped shows the column of Mail boxes such as Inbox, Sent etc.
This icon by default when creating the Split View disappears after tapping, it shows the third column and disappear , I would like it to stay so I can show and collapse the first column sam as Apple Mail App. how to do that ? its called back also how to rename it and add icon to it ?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
when declaring variables or constants inside a Struct in SwiftUI projects is it by default private or internal ?
seems little confusing cause I see some using the private word explicitly sometimes.
Kindest Regards
Hi,
How can I customize the Back Button in Column 2 "Content" in SplitView, like changing its color, label, icon ? Also is it possible to keep it visible even when Column 1 is shown and make it work like toggling showing and hiding Column 1 ?
Kindest Regards
Hi
How can we add multi view to NavigationPath in one go like in code below maybe using something like path.append(mobiles.all) ? where all 3 views of mobiles Array get added at once ?
Kindest Regards
`struct NavigationPathView: View {
var mobiles: [Mobiles] = [.init (name: "iPhone", imageName: "folder", color: .mint),
.init (name: "Samsung", imageName: "pin", color: .pink),
.init (name: "Mac Pro", imageName: "book", color: .gray)]
@State var path = NavigationPath()
var body: some View {
NavigationStack (path: $path) {
List {
Section ("Platforms") {
Button("Go To Platform") {
path.append(mobiles.first!)
}
Button("Go To Mobile") {
path.append(mobiles.last!)
}
Button("Add All Mobiles") {
}
}
}
}
.navigationDestination(for: Mobiles.self) {mobile in
ZStack {
mobile.color.ignoresSafeArea()
VStack {
Image(systemName: mobile.imageName)
Label (mobile.name, systemImage: mobile.imageName)
.font(.largeTitle).bold().foregroundColor(.white)
Button("Go Home") {
path.removeLast(path.count)
}
}
}
}
}
}
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
Hi,
How to delete a post from Apple Developer Forum ?
Kindest Regards
Hi,
How to catch the event when details panel of a SplitView shows and get hidden, like when split is 2 columns and when its details only ?
Kindest Regards
Hi,
How to hide the Chevron icon from a list rows in SwiftUI ?
Kindest Regards
Topic:
UI Frameworks
SubTopic:
SwiftUI
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()
}
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
Hi,
I know how to sort SwiftData records based on one of its properties such as name, but how to sort based on recent updated records ? like in Apple Notes App ?
Kind Regards
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"
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
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
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