Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

Reply to CollectionView in TableView
But actually when i try to connect my ViewCollection with my ViewController, i recieve Error Outlets cannot be connected to repeating content. When i try to create it manualy, inside my function tableView(), the column which contains the ViewCollection isn't recognise.
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’18
Reply to Make method less repetative
Oh, ok. I had misunderstood what you are trying to accomplish.FWIW, besides the fact there is not what you want, maybe i should have written in this way...private func generateLoserLocationFunction(numberOfPlayers: Int) -> (column: Int, row: Int) -> (column: Int, row: Int) { switch numberOfPlayers { case 8,16,32: return { row, column in let newCol = -2 * column switch (column,numberOfPlayers) { case (0,_): return (newCol, row / 2) case (1,8), (2,16), (3,32): return (newCol, row ^ 1) case (1,16): return (newCol, 3 - row) case (1,32): return (newCol, (row + 4) % 8) case (2,32): return (newCol, row) default: return (newCol, 0) } } default:abort() } }But going back to you problem, so, if i understand well, it's a case of premature optimization, like in our example of colors:func generateGetColorFunction(numberOfPlayers: Int) -> () -> UIColor { if numberOfPlayers == 8 { return { return UIColor.redColor() } } else if numberOfPlayers == 16 { return { return UI
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’15
Reply to How to declare a TableColumn with nullable field?
Just ran into this issue too when working through a simple struct with Strings. A table of mostly strings with some columns sensibly optional Strings. The compiler message displayed in Xcode 13.3 is: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions So not helpful. Removing the path does seem to work, but the docs would suggest that the column will no longer participate in sorting state of the table. I too can think of use cases where I have optional data but want the rest of the non-optional Strings to be sorted (either at the bottom or the top).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’22
Reply to Using Apple sign in with Developer ID for a Mac Catalyst app distribution
So I guess what the ADP column really means is applications sold on the App Store, right ? Right. And the Apple Development signing your use when developing such apps. If you distribute your product independently, reference the Developer ID column. It is a little frustrating not to be able to use this feature directly I can’t really comment on the policy here — Sign in with Apple is definitely outside of my area of expertise — so all I can do I clarify what that policy is. ps The term ADP name makes more sense in the corresponding iOS reference. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Code Signing SubTopic: Entitlements Tags:
Mar ’22
Reply to Screen Space Coordinates to CVPixelBuffer Coordinates
Okay after finding this question and trying what it said I made some progress. However, I am attempting to use arView.session.currentFrame.smoothedSceneDepth and not arView.session.currentFrame.estimatedDepthData. Here is the updated extension: extension CVPixelBuffer { func value(from point: CGPoint) -> Float? { let width = CVPixelBufferGetWidth(self) let height = CVPixelBufferGetHeight(self) let normalizedYPosition = ((point.y / UIScreen.main.bounds.height) * 1.3).clamped(0, 1.0) let colPosition = Int(normalizedYPosition * CGFloat(height)) let rowPosition = Int(( 1 - (point.x / UIScreen.main.bounds.width)) * CGFloat(width) * 0.8) return value(column: colPosition, row: rowPosition) } func value(column: Int, row: Int) -> Float? { guard CVPixelBufferGetPixelFormatType(self) == kCVPixelFormatType_DepthFloat32 else { return nil } CVPixelBufferLockBaseAddress(self, .readOnly) if let baseAddress = CVPixelBufferGetBaseAddress(self) { let width = CVPixelBufferGetWidth(self) let index = column
Topic: Spatial Computing SubTopic: ARKit Tags:
Apr ’22
Reply to errSecInternalComponent building locally with Xcode
In the My Certificates tab, that certificate and its associated private key both show login in the Keychain column. I have several other development identities in my keychain and others are working, it's just this one that isn't. The others also have both their certificates and private keys in the login keychain.
Topic: Code Signing SubTopic: General Tags:
Oct ’23
Reply to SwiftUI dynamic number of columns with LazyVGrid
Yes, it helped another ancient coder. I'm working on Swift access to MySQL databases to maintain homemade bookkeeping programs. I wanted to display the results of a query, which can of course have a varying number of columns with varying keys. I tried for a couple of days to figure out the Table/TableColumn SwiftUI View, and then found your post. Something like this is working great: ForEach(aDBModel.dbRowsAsDicts, id: .id) { thisDict in HStack { LazyVGrid(columns: obsColumns, content: { ForEach(aDBModel.identifiableFieldNames, id:.id) { aColName in Text(thisDict.theDict[aColName.theString] ?? ) } }) } } Thanks! XCode sure beats keypunching, waiting for your deck of cards to run, and then looking up a bunch of numeric error codes!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’22
Reply to Help with a script to automate data entry
Someone on another forum tried to help by writing a macro for Excel but I failed to tell him I was using Numbers so, of course, it doesn't work but they did give me a clue in their attempt. I need to write a script that: (I can change the names later) -calls up the document XXX -calls up Sheet1 -copies the value of Sheet1, cell B67 -calls up sheet Sheet2 -pastes the result in cell A3 of Sheet2 -inserts a new column (or row) A on Sheet2 (preserving previous result) -recalculates Sheet1 -copies the result from Sheet1, cell B67 to column A of Sheet2 in cell A3 and do that 2000 times Can any good apple script writers out there help me achieve this? Thanks in advance
Mar ’24
Reply to Upgraded to Xcode 15.0.1 and no longer see NSLog messages
I have found a solution , see this post [https://developer.apple.com/forums/thread/742594] Select the relevant product in the the Scheme dropdown (e.g. [AppName] Watchkit App, or [AppName] for iOS app Select Edit Scheme... Select Run in list on the left Select Arguments tab Click > next to Environment Variables to show a (probably empty) list. Click + In Name column, double click the space and enter: IDELogRedirectionPolicy In Value column double click the space and enter: oslogToStdio Ensure the checkbox is selected Click Close button. You have to repeat these steps for each iOS, WatchOS product as each has its own Run Scheme. Now NSLogs will print to the Debug Console again.
Dec ’23
Reply to App crashed
In your snippet, blocks is an array of arrays, which you’re treating like a two-dimensional array. Both row and col values range from 0 to 16. However, your blocks array has a row count of 1 and a column count of 2. Hence the out of bounds trap. In short, you need many more values in blocks. Or you need to reduce the range of row and col. For the former, you can use repeatedElement(_:count:): let blocks = [[Color]](repeatElement([Color](repeatElement(Color.purple, count: columns)), count: rows)) Oh, one last thing: Swift supports half open ranges, so you can write this: 0...self.rows - 1 as this: 0..
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’22
Reply to Simplest client server example code using IPC using XPC using swift on MacOS
This DAL plugin are loaded as a virtual camera in … I don’t know whether those specific third-party apps are sandboxed. However, it’s easy to work this out: Update your plug-in to log its process ID at startup. In fact, if you use the standard logging API then each log entry automatically includes the process ID. Load your plug-in in the app. Run Activity Monitor and look for that process ID. See whether the Sandbox column says Yes (if you can’t see that column, control click on the table header and enable it from the popup). Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’21
Reply to Titles and Header Auto Changing Color?
The first image with time 9:35 shows a list of transactions sorted by date using List{}. The column headers are displaying in DARK mode with a black stripe, and header items have switched from black to white. The second image (9:39) changed to a ScrollView {}. The column headers did not change color, but scrolled out of the view. The header is showing that the text has changed from black to white while scrolling. The final image is a ScrollView with LazyVStack pinnedViews. Google suggested using .toolbarColorScheme(.light, for: .navigationBar) at the bottom of the ScrollView to prevent the header stuff from changing color. So my question is: Is this change in color for these views a bug or is this normal behavior with Liquid Glass?
Topic: Design SubTopic: General Tags:
1d