Search results for

column

2,048 results found

Post

Replies

Boosts

Views

Activity

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 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 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 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 Print something on the screen
I created the structure down the let columns above the ContentView and I called the NumberView in the Button's action and now the error it's gone. But when I play my code and click the button it doesn't show me the text. Can't understand why...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to Save DataFrames as CSVs
I don’t think there’s a way to do that but, if you know that the names are unique, you can rename the columns after the join. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’22
Reply to Problems with connections (IBActions)
In my code, the class 'ExampleA' is a UIViewController, and class 'ExampleB', is a UITableViewController, because I am trying to link 2 different ViewControllers. My objective is that when the user clicks on a button, it will set off a table in a different ViewController to add a column to it.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’19