Post

Replies

Boosts

Views

Activity

NavigationSplitView behaves not right with `SwiftData`
I do have a simple application that uses the new swiftUI framework SwiftData. This is the SwiftData model named Note: import Foundation import SwiftData @Model class Note { init(name: String, content: String) { self.name = name self.content = content } @Attribute(.unique) var name: String var content: String } And this is the ContentView sample: import SwiftUI import SwiftData struct ContentView: View { @Environment(\.modelContext) private var modelContext @Query var notes: [Note] @State var newNoteName: String = "" @State var presentNewNoteAlert = false var body: some View { NavigationSplitView { List { ForEach (notes){noteTitle in NavigationLink (noteTitle.name) { NoteEditing(noteModelClass: noteTitle) } } .onDelete(perform: deleteNote) } .navigationTitle("Notes") .toolbar { Button ("", systemImage: "plus", action: { presentNewNoteAlert = true }) } } detail: { Text("Select a note to edit") } .alert("New note name", isPresented: $presentNewNoteAlert) { TextField("", text: $newNoteName) HStack { Button("Done", action: submit) Button("Close", role: .cancel) {} } } } } Here, if I used NavigationSplitView for the ForEach, there is a weird issue where all NavigationLink's destinations becomes the same!. But If I change it to NavigationStack the destination issue fixed. This is a peak: NavigationSplitView duplicating destination issue: The NavigationStack behaving good and not duplicating the NavigationLink's destination:
2
1
608
Oct ’23
Hello, there!, How to start with metal as a beginner ?
Hello Metal programmers, i would like to start programming with metal, but I can not see any place to start from! I searched on YouTube, google, etc.. but I did not see any thing, Please help me to start with "Metal programming". I think this site is the good place to ask. And I would like to know what language that metal use? Is it have its own language ? Or its use swift or obj-c ?
1
1
885
Aug ’22
This is not question, this is message to iPadOS team.
Great what you did in iPadOS 16, this is a giant step towards bigger major updates, what we want now in iPadOS 17 is the following: 1- We want a “terminal” system on the iPad with the ability to use it in programming and development, and allow applications to access it in order to create professional IDE copies for the iPad. 2- We hope to have a copy of one of the professional programs on Mac, such as F CUT PRO or XCODE. 3- Improving the stage manager further to become more effective and more real. 4- Take advantage of the empty top space that lies between the battery charge number and the watch, so that there are larger items that we can take advantage of such as a Mac, or even something better than a Mac. We want you to wow us with the iPadOS 17 update. Good luck..
0
0
969
Jul ’22