Hello,
How do I make the Tab Bar appear in the toolbar using SwiftUI for macOS? Instead of a seperate tab and tool bar I want it to be unified.
I am looking for a design similar to the "Compact" safari tab option, as shown in this window:
Thanks in advance,
Dev_Pro
Post
Replies
Boosts
Views
Activity
Hello,
I am developing a multi-platform app, and I need an emoji picker. It should be the same as the emoji selection view in the Reminders App.
Reminders App Image:
(A button; when pressed calls the MacOS emoji selector, and the emoji selected is linked to a variable).
I know you can call the EmojiSelector with
NSApp.orderFrontCharacterPalette($variable)
However, it only records the variable if you have a working text field linked to the variable. Then, if you edit the text field you can select more than 1 character, a non-emoji, and the emoji popover is not shown under the button.
How do I make an emoji selector like the one above. Does it require a textfield for the selected emoji to be linked to a variable.
If it does, can the text field be:
Not Viewable and in a ZStack under the button
Only editable by the emoji selector
Replace the current emoji when another is selected
Sorry if my question is lengthy. I have everything else in my app ready, and want to release it to the app store (it will be free).
Thank you for any help,
Dev_Pro
Hello,
I am unable to move multiple rows in a list, it only allows for one at a time. However, I am able to select multiple rows.
Here is my code:
import SwiftUI
struct ContentView: View {
@State var items = ["Test 1", "Test 2", "Test 3", "Test 4", "Test 5", "Test 6"]
@State var selectedItems: Set<String> = .init()
var body: some View {
NavigationView {
List(selection: $selectedItems) {
ForEach(items, id: \.self) { item in
Text(item).tag(item)
}
.onMove(perform: { indices, newOffset in
withAnimation {
self.items.move(fromOffsets: indices, toOffset: newOffset)
}
})
}
#if os(iOS)
.navigationBarItems(trailing: EditButton())
#endif
}
.padding()
}
}
I need all the selected rows to move when dragged.
Any help would be greatly appreciated, I have tried, and can not find any way to do it.
Thanks, Dev_101
Hello,
How do I add a keyboard shortcut to an existing menubar command in a macOS AppKit app. Specifically, I would like to make the Delete shortcut under Edit work when I press command delete.
How do I add a keyboard shortcut to the existing command?
Thanks,
Dev_101
Hello,
I am developing a swift data macOS reminders app. I need the user to be able to select multiple items from the sidebar and record a variable of which ones are selected. However, I also want a variable that will track the first one of the selection selected so it can be shown in the detail view.
I would like this to be similar to the Apple reminders app, where u can select multiple to delete, but only one list is shown in the detail view.
how do I do this?
thanks so much,
Dev_Pro