Background: I'm targeting macOS 11 and up, running macOS 12.4 (21F79), and working with Xcode 13.4 (13F17a). I am building an application to show a list of VMs running under my account on a hosting provider. The VMs have a lot of simple properties like a UUID, a name, a comment field, a power state, and so on. They also have a few properties which are lists of relationships to other things. For example, a single VM can have several disks or several network adapters. The VMs can be organized in folders, so I'm trying to use NSOutlineView bound to a tree controller to show the downloaded data. The problem I have is that when I scroll my outline, it has significant animation hitches. Instruments tells me they are due to expensive commits. I originally built the NSOutlineView programmatically, but I've switched to building it in Interface Builder to get the NSTableCellView reuse behavior without needing to subclass and write my own implementations. I have an NSView subclass for the disk column's views an
Search results for
column
2,047 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello there! I want to create a cards game, and I'm creating it following the Stanford University's tutorial. I followed the video step by step but there is a warning that In the video doesn't appear. Can someone help me to fix it? Here's the link of the video: [https://www.youtube.com/watch?v=oWZOFSYS5GE&t=671s) This is my code: import SwiftUI struct ContentView: View { let viewModel: EmojiMemoryGame var body: some View { VStack { LazyVGrid(columns: [GridItem(), GridItem(), GridItem()]) { ForEach(viewModel.cards) { card in CardView(card: card) .aspectRatio(aspectRatio, contentMode: .fit) // here's the first error which says Cannot convert value of type '(CGFloat?, ContentMode) -> some View' to expected argument type 'CGSize' } } .padding() .foregroundColor(Color(.systemTeal)) Spacer() Button { emojiCount += 1 if emojiCount == 10 { aspectRatio = 9/3 } ì if emojiCount > 17 { print(Card finished) } } label: { Text(Add Card) } } } } struct CardView: View { let card: MemoryGame.Card var body: s
Xcode 14.0 beta 5 (14A5294e) seem to have fixed my issues with NavigationSplitView Fixed - Warnings Fixed - Selection of cell not happening (2nd time) in compact mode (For 3 column layout) - so no need to set the selected state of the middle column to nil onDisappear Hopefully it has fixed your issues as well, if not please file a feedback
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
This thread is about provisioning Network Extension providers. That capability is not supported by a free accounts (what Xcode calls a Personal Team). If your goal is to create an NE provider, you’ll need a paid account. For information about which capabilities are supported by which account types, see Developer Account Help > Reference > Supported capabilities (macOS) and the equivalent docs for our other platforms. In this context the Apple Developer column shows the capabilities for a Personal Team. If you’re not trying to create an NE provider, I recommend that you start a new thread with the details of your issue. Oh wait, it looks like you’ve started this thread. I’ll respond over there. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic:
App & System Services
SubTopic:
Drivers
Tags:
From the way Apple made the NavigationSplitView API, it is clear that having two and three column layouts shouldn't happen or should be avoided. Nevertheless, you can still achieve this through the use of two split views wrapped in a condition. Something like this, which I have tested, will work: struct ContentView: View { @State private var selectedInt: Int? = 1 @State private var columnVisibility: NavigationSplitViewVisibility = .all var sidebarList: some View { List(1...10, id: .self, selection: $selectedInt) { int in NavigationLink(Row (int), value: int) } .navigationTitle(Sidebar) } var contentView: some View { Text(Content (selectedInt ?? 0)) } var detailView: some View { Text(Detail (selectedInt ?? 0)) } var body: some View { Group { // Only rows that are a multiple of 2 will have a two-column layout if selectedInt?.isMultiple(of: 2) == true { NavigationSplitView(columnVisibility: $columnVisibility) { sidebarList } detail: { detailView } } else { NavigationSplitView(columnVisibility:
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
I have a SwiftUI Table on iPadOS that supports multiple selection and contains rows representing documents that can be opened. I want to be able to select multiple rows from edit mode or with keyboard modifiers for batch operations, but a regular tap on a single item should open it and push it onto the navigation stack. Rows are highlighted when I tap on them, but the table's selection isn't modified and I can't figure out how to respond to that action. There's nowhere for me to put a NavigationLink because I'm only providing views for each column and not for the row itself. I could also push onto the navigation stack manually if I could respond to the action, but I don't see any API for doing so. I've tried using .onChange(of: selection) and checking that the selection only contains a single element, but single taps on rows don't modify the selection, and even if they did, this logic would trigger incorrectly when adding the first item to the selection in edit mode for example. Is there something I'
You can export a CSV file and have something sort of like this. While that’ll work, if you’re doing anything serious with CSV files I strongly recommend that you check out the TabularData framework. See the code snippet below. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com import Foundation import TabularData let csv = Aloe Vera, skin healer, Cut from middle, once every three days, cut the leave and use the gel inside for your rash Almond, skin healer, cut the young leaves, daily, soak in water overnight rinse and blend func main() throws { var options = CSVReadingOptions() options.hasHeaderRow = false let frame = try DataFrame.init(csvData: Data(csv.utf8), options: options) print(frame) // ┏━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳… // ┃ ┃ Column 0 ┃ Column 1 ┃ Column 2 ┃… // ┃ ┃ ┃ ┃ ┃… // ┡━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇… // │ 0 │ Aloe Vera │ skin
Topic:
Developer Tools & Services
SubTopic:
Developer Forums
Tags:
The problem is there even in Apple's sample Bringing robust navigation structure to your SwiftUI app | Apple Developer Documentation: on Mac Related Recipes cannot be selected after choosing Experience > Two Columns > Dessert > Apple Pie.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Could you please provide a navigation sequence showing the issue? For example the following works as expected under iOS in portrait mode: Two Columns > Dessert > Apple Pie > Related Recipes: Pie Crust shows the details for Pie Crust
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Hey there, I was trying to get an overview of the new navigation in the Xcode-14 Beta. I watched the WWDC22 session The SwiftUI Cookbook for Navigation and downloaded the associated sample code https://developer.apple.com/documentation/swiftui/bringing_robust_navigation_structure_to_your_swiftui_app. When trying it out, I noticed that the two-column mode of the NavigationSplitView in portrait mode does not work properly on iOS. In the download version of NavigationCookbook, a click on one of the related recipes in the recipe detail view does not lead to the detail view of the corresponding recipe (portrait format only on iOS), but to the detail of the NavigationSplitView. The only solution I found was to include a NavigationStack in .navigationDestation. Is there a more sophisticated solution other than using @Environment(.horizontalSizeClass) private var horizontalSizeClass to avoid the problem.
Since List is very versatile, I'm not sure why it cannot be used here. For example, the following works fine in iOS and iPadOS (by persisting the selection): import SwiftUI class Q708440NavigationModel: ObservableObject { @Published var selectedThingId: Thing? } struct Thing: Identifiable, Hashable { let id: UUID = UUID() let name: String } class ThingData: ObservableObject { @Published var things: [Thing] = [ Thing(name: One), Thing(name: Two), Thing(name: Three) ] } struct ThingDetail: View { let thing: Thing @EnvironmentObject var navigationModel: Q708440NavigationModel var body: some View { Text(Thing: (thing.name)) } } struct SomeOtherViewHere: View { var body: some View { Text(Some other view) } } @main struct Q708440App: App { @StateObject var navigationModel = Q708440NavigationModel() @StateObject var thingData = ThingData() var body: some Scene { WindowGroup { Q708440(things: $thingData.things) .environmentObject(navigationModel) } } } struct Q708440: View { @Binding var things: [Thing] @EnvironmentO
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
For three column layouts, try setting the selected state of the middle column to nil onDisappear as done in ThreeColumnContentView within https://developer.apple.com/documentation/swiftui/bringing_robust_navigation_structure_to_your_swiftui_app
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Yes, best to use the new APIs as suggested in https://developer.apple.com/wwdc22/10054 There is a bug (mentioned in my earlier post) with NavigationSplitView with the navigation on a single column, but this is marked as a known issue in iOS 16 beta (3, 4) release notes.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Is there any way to set common currency for all the Territory except India? Eg: We want to set $6.59 to all the countries & India INR 49/- All prices & currency list has 3 columns. Want to know whether the Year 1 & Year 2 proceeds are exclusion of all taxes & Apple commission? When we choose the primary currency in the US dollar, why again is the US dollar price getting changed in the confirmation page. Please find its relevant screenshots
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
In-App Purchase
App Store Connect
StoreKit
Subscriptions
When I followed the procedure to symbolicate an external file by changing the .ips extension to .crash, adding an external device, viewing All Logs and dragging the .crash file from MacOS12.4 Finder to the LH column, a part of the log appear in the RH window but does not include any frame data. The last line is Crashed Thread: 0 Dispatch queue enabled. Right-clicking on the added file and selecting Re-Symbolicate Log results in nothing happening. If I click Done and open View All Logs again, the added file is not present. I presumed this was due to lack of debug symbols but from your comment this is not the case.
Topic:
App & System Services
SubTopic:
General
Tags: