Hello! The Aim of my project is as specified in the title and the code I am currently trying to modify uses CVPixelBufferGetBaseAddress to acquire the DepthData using LiDAR. For some context, I made use of the available Capturing depth using the LiDAR camera Documentation using AVFoundation and edited code after referring a few Q&A on Developer Forums. I have a few doubts and would be grateful if I could get insights or a push in the right direction. Regarding the LiDAR DepthData: Where is the Origin(0,0) and In what order is it saved? (Basically, how do the row and column correspond to the real world scenario) How do I add a touch gesture to fill in the values of X&Y for distanceAtXYPoint so that I can acquire the Depth data on user touch input rather than in real-time. The function for reference : //new function to show the depth data value in meters func depthDataOutput(syncedDepthData: AVCaptureSynchronizedDepthData) { let depthData = syncedDepthData.depthData.converting(toDepthDataType:
Search results for
column
2,071 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi, How can I customize the Back Button in Column 2 Content in SplitView, like changing its color, label, icon ? Also is it possible to keep it visible even when Column 1 is shown and make it work like toggling showing and hiding Column 1 ? Kindest Regards
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.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
I have an image (or filled rectangle, or anything) placed inside a NavigationLink, but it doesn't get its full width, instead it's the width minus the corner radius. Here's my simplified code: ScrollView(.vertical, showsIndicators: false) { LazyVGrid(columns: columns, spacing: 20) { ForEach(children, id: .self) { childTopic in NavigationLink(value: childTopic) { Image(childTopic.previewImage) .resizable() .scaledToFill() .frame(maxWidth: 300, maxHeight: 150, alignment: .top) .clipShape(RoundedRectangle(cornerRadius: 15.0, style: .circular)) } .buttonBorderShape(.roundedRectangle(radius: 15.0)) .padding(20.0) } } .padding() } The screenshot shows what each list items look like. Is it possible to make the image fill the NavigationLink? PS: I played around with .buttonStyle(.plain) on the NavigationLink, but on visionOS it still gets an overlay when the user looks at it - which is a good thing, but larger than the image.
Thanks to the helpful explanation in this article https://lapcatsoftware.com/articles/2023/10/5.html I understood the cryptic references in the XCode 15 release Notes and answered this myself. To return to XCode 14 and earlier world in which NSLog works you have to do this: 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. I have no idea about other side effects as I don't need more sophisticated logging. Works fine when connected by Network too.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
I have an image. The table has many columns and associated rows with it. Is it possible to recognize a particular column's key and values from the table?
Can reproduce this with Xcode Version 15.1 beta 3 (15C5059c) deploying to iPhone 14 Pro running iOS 17.1.1. Make a test project with Apple's LazyVGrid sample code. Launch app in portrait, scroll to bottom, rotate to landscape, rotate to portrait, scroll to top, crash! let columns = [GridItem(.flexible()), GridItem(.flexible())] var body: some View { ScrollView { LazyVGrid(columns: columns) { ForEach(0x1f600...0x1f679, id: .self) { value in Text(String(format: %x, value)) Text(emoji(value)) .font(.largeTitle) } } } } private func emoji(_ value: Int) -> String { guard let scalar = UnicodeScalar(value) else { return ? } return String(Character(scalar)) } id: .self tut tut Apple sample code developer! (this is not the cause of this crash though).
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
I'm building up a data frame for the sole purpose of using that lovely textual grid output. I'm getting output without any issue, but I'm trying to sort out how I might apply a formatter to a specific column so that print(dataframeInstance) just works nicely. In my use case, I'm running a function, collecting its output - appending that into a frame, and then using TabularData to get a nice output in a unit test, so I can see the patterns within the output. I found https://developer.apple.com/documentation/tabulardata/column/description(options:), but wasn't able to find any way to pre-bind that to a dataframe Column when I was creating it. (I have some double values that get a bit excessive in length due to the joys of floating point rounding) Is there a way of setting a formatter on a column at creation time, or after (using a property) that could basically use the same pattern as that description method above?
Hi @Ammar S. Mittori, The way that mail works on my iPad is that it shows two columns at first, and when you press the button to expand to three columns, that button disappears. To go back to the two column view, you click on the rightmost detail column and it will collapse. If you do want to show a button to collapse the third column, you can try code like this: struct ContentView: View { @State private var columnVisibility: NavigationSplitViewVisibility = .all var body: some View { NavigationSplitView(columnVisibility: $columnVisibility) { Text(Column 1) } content: { Text(Column 2) .toolbar { Group { if columnVisibility == .all { ToolbarItem(placement: .navigation) { Button(Back){ columnVisibility = .doubleColumn } } } } } } detail: { Text(Column 3) } } } This code sets a variable for the column visibility to be all the columns, and then changes that variable to just two columns when the back button is clicked
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Hi, When creating a 3 columns Split View in SwiftUI the second view that resemble the mails list in Apple Mails App have a blue icon at top left corner where when tapped shows the column of Mail boxes such as Inbox, Sent etc. This icon by default when creating the Split View disappears after tapping, it shows the third column and disappear , I would like it to stay so I can show and collapse the first column sam as Apple Mail App. how to do that ? its called back also how to rename it and add icon to it ?
I have created a simple calendar framework of my own. The screenshot below shows what it looks like. The following lines show a concise version of my calendar framework. The deal is such that the app will return a date when I tap a date button with the callBack closure. import SwiftUI struct ContentView: View { @State private var navigateToAddDate = false @State private var days: [Day] = [] @State var callBack: ((Date) -> Void) private let cols = [ GridItem(.flexible()), GridItem(.flexible()), GridItem(.flexible()), GridItem(.flexible()), GridItem(.flexible()), GridItem(.flexible()), GridItem(.flexible()) ] var body: some View { NavigationStack { VStack { LazyVGrid(columns: cols) { ForEach(days, id: .self) { day in Button(action: { selectedDay = day navigateToAddDate.toggle() }, label: { Image(systemName: (day.num).circle.fill) .resizable() .aspectRatio(contentMode: .fit) .foregroundColor(day.show ? dateTextForecolor(day: day) : .clear) }) .disabled(day.isInvalid) } } } } } } struct ContentView_Pr
I talk about these errors in On File System Permissions. That suggests that: Your SMB share access is being denied by either the App Sandbox or MAC. Your spawning of a child process is being blocked by BSD permissions. However, it’s hard to be sure without more info. Let’s start with the second issue, because those problems are usually easier to resolve. How are you trying to spawn that child process? Using Process (NSTask in C-based languages)? Or fork / exec*? Or posix_spawn? Or something else? Could it be that the app is sandboxed by default on MacOS 14.1? That seems unlikely, but if you want to know whether an app is sandboxed you can view that in Activity Monitor. Control click on the process table header to enable the Sandbox column. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic:
App & System Services
SubTopic:
Core OS
Tags:
User flow: u1. a user starts playing some audio in the app before playing was set category try audioSession.setCategory(.playback, mode: .default, policy: .longFormAudio) was activated category try audioSession.setActive(true, options: []) set nowPlayingInfo playing via AVPlayer u2. user taps on the button of airplay (AVRoutePickerView) and changes the route of sound u3. A user can hear sounds from a Bluetooth column, or connect to an Apple TV with its own audio system... Issue: On iOS 17, after changing the route to Apple TV, a user can not hear a sound(apple tv works properly but sounds unavailable(if I do the same on iOS 16 everything works correctly)). AVPlayer works correctly. in the app I only receive event(name AVAudioSession.routeChangeNotification), and reason: RouteChangeReason.categoryChange (doc description: The audio category has changed (AVAudioSessionCategoryPlayback has been changed to AVAudioSessionCategoryPlayAndRecord).) Apps capabilities has Background Mode = Audio, AirPlay.... Qu
Hello all! I'm implementing a view that shows a grid of different histograms to show a final report to the user. It could have ~100 rows and ~10 columns. I'm using a LazyVGrid and it looks like: Note: the example contains only 3 rows. It takes less than a second to render the grid, but you can feel the app is blocked for a few ms. I was wonder if some of you know how to render asynchronously the chart views so, at least, not block the interface. Thanks!
Is there a way to get a SwiftUI Table to be able to sort by a column of optionals? You can extend Optional for your specific case. For example, if you are trying to sort by an optional Int: extension Optional where Wrapped == Int { var sortOrder: Int { switch self { case let .some(wrapped): wrapped case .none: Int.max } } } Then your TableColumn would look like this: TableColumn(Count, value: .count.sortOrder) { if let count = $0.count { Text(String(count)) } } If count is nil, it will be sorted as if its value is Int.max and the column will be blank for that row.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: