Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

log stream command does not yield any events
We are having some trouble getting log stream to output events in real time from coreaudiod while we are in a zoom call or listening to audio. Repro steps: Open a Terminal window and execute log stream --predicate process=='coreaudiod' Create a zoom call, join it, stay for 10 seconds, leave the meeting Expected: audio events should show in log stream Terminal window Actual: no audio event shows Also, if after this test I execute log show --last 5m process=='coreaudiod' the events are showing; that is proof that coreaudiod actually emitted those events; Does anybody have any idea what could cause this? This happens on Sonoma 14.2.1, on an MBP M2 Max with 64GB memory. What we have looked at already: actually log stream does not show events from a lot of other procs on the machine; executing log stream --timeout 10s --style json | jq .[] | jq .processImagePath | sort | uniq -ic | sort --reverse yields only 3 sources (counts in the first column): 205 /kernel 10 /System/Library/CoreServices/ManagedClien
3
0
1.1k
Feb ’24
size, color formatting of DatePicker
I'm experimenting with the relatively new (to me) compact DatePicker. I'd like a column of aligned fields, the first two on top are date pickers for user input, the ones below that are dates outputted in textfields calculated from dates input by user. In Interface Builder in Xcode, it looks mostly like I want it, black text centered in white rectangular text fields. But in production on my iPhone, the DatePickers are functional, but they are not centered and they appear on a gray background. I haven't been able to figure out what settings to adjust to make the DatePicker's date centered and on white background. Screenshots attached. Grateful for help. --JS
4
0
1.3k
Feb ’24
Preview Autogenerated Code Error
Hello, Very recently, the following code has automatically appeared at the bottom of three of my SwiftUI View files: @available(iOS 17.0, macOS 14.0, tvOS 17.0, visionOS 1.0, watchOS 10.0, *) struct $s10Accent_Ace33_0BADA584A03144EFDAB57154E6FD3FBALl7PreviewfMf_15PreviewRegistryfMu_: DeveloperToolsSupport.PreviewRegistry { static let fileID: String = Accent_Ace/HistoryView.swift static let line: Int = 47 static let column: Int = 1 static func makePreview() throws -> DeveloperToolsSupport.Preview { DeveloperToolsSupport.Preview { let randomWord1 = FetchWord.getRandomWord() let randomWord2 = FetchWord.getRandomWord() @State var randomWords = [Word(word: randomWord1.0, IPA: randomWord1.1, lineNumber: randomWord1.2), Word(word: randomWord2.0, IPA: randomWord2.1, lineNumber: randomWord2.2)] HistoryView(words: $randomWords) } } } This is from one of my files but it's very similar in the other two. It seems to have something to do with my previews. The problem is that this code generates an error: Ambigu
4
0
1.5k
Jan ’24
Json Data Corrupted Error After Updating macOS to 14.2.1 and Xcode to 15.2 with ixguard Toolchain
After updating my macOS to version 14.2.1 and Xcode to version 15.2, I am encountering an issue when attempting to run my iOS app on a physical iPhone device. The app runs successfully in the simulator, but when deploying to the iPhone, I receive the following error: dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: The given data was not valid JSON., underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 Unexpected character 'i' around line 1, column 2. UserInfo={NSJSONSerializationErrorIndex=1, NSDebugDescription=Unexpected character 'i' around line 1, column 2.})))
0
0
682
Jan ’24
SKTextureAtlas Error
I am using the following code to create a texture atlas at runtime using a single .png image sprite sheet: func createSpriteTextureAtlas(atlasNumber atlas:Int, forWorld world:Int) { //load the png file let image = UIImage(named: world(world)_spritesheet(atlas)_2048x2048.png) //create the dictonary var imageDictionary = [String: UIImage]() //iterate through all rows and columns and get the subimage var imageIndex = 0 for row in 0...7 { for column in 0...7 { let sourceRect = CGRect(x:column * 256, y:row * 256, width:256, height:256) let sourceImage = image?.cgImage!.cropping(to: sourceRect) let subImage = UIImage(cgImage: sourceImage!) //add the sub image and name to the dictionary imageDictionary[(imageIndex)] = subImage imageIndex = imageIndex + 1 } } //create the texture atlas using the dictionary spriteTextureAtlas[atlas] = SKTextureAtlas(dictionary: imageDictionary) } I have a different sprite sheet for every world. I made all the sprite sheets myself using the same tool. This code works
2
0
936
Jan ’24
Querying data from one-to-many relationship by aggregate in swiftdata
Hi all, I've been struggling a bit with SwiftData, I have a really simple data model but I need to do a fairly complex query over a one-to-many relationship that results in aggregate values. And I want to be able to sort and filter those aggregates. The model looks like this: @Model class Category { var name: String var items = [Item]() } @Model class Item { var added: Date var checked: Date? } In a typical use case I'd expect their to be at most around 50 categories and perhaps 20 items per category. In my UI I would like to be able to sort categories in a couple of ways: by name, by date added and by date checked with a fallback on date added. Also, in my list view I want to be able to list categories and show the checked date of the most recently checked item. I can think of a couple of solutions here, to start of with I can do all the sorting and filtering client-side. In the list view I could retrieve all the categories and then find the most recently checked item per category and go from there. Another
0
0
496
Jan ’24
#Preview Compiling failed: ambiguous use of operator '=='
My MacOS app only cares about days, not time-of-days, so I made a simple Date Extension: extension Date { static func ==(lhs: Date, rhs: Date) -> Bool { let order = Calendar.current.compare(lhs, to: rhs, toGranularity: .day) return (order == .orderedSame) } } My app compiles fine and works as intended. However, #Preview is failing to build the preview, erroring with: CompileDylibError: Failed to build DayRow.swift Compiling failed: ambiguous use of operator '==' @__swiftmacro_45test_calendarview_PreviewReplacement_DayRow_133_EA4566EE578D744A3A6BCC599B1B43AALl0C0fMf_.swift ------------------------------ @available(iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0, xrOS 1.0, *) struct $s45test_calendarview_PreviewReplacement_DayRow_133_EA4566EE578D744A3A6BCC599B1B43AALl0C0fMf_15PreviewRegistryfMu_: DeveloperToolsSupport.PreviewRegistry { static let fileID: String = test_calendarview_PreviewReplacement_DayRow_1/DayRow.1.preview-thunk.swift static let line: Int = 160 static let column: Int = 1 static func
0
0
423
Jan ’24
Reply to Dynamic e random matrix
Claude31, Exactly. In the application, the user will answer some questions and according to their answer, a certain column X row will be filled with information. Like this: The cell (col X row) to be filled depends on the user's response The content will be text, a string. You can restart the app at any time, when previously used cells must be cleaned.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’24
Reply to SwiftUI indentation in multiline string
Hi there! Decided to post a reply, as I found a working solution. You can define custom grid items width and use it with LazyVGrid: struct MyView: View { let bulletListGridItems = [ GridItem(.fixed(10)), GridItem() ] var body: some View { LazyVGrid(columns: bulletListGridItems, alignment: .leading, content: { GridRow { VStack(alignment: .leading, content: { Text(•) Spacer() }) Text(Play the course as you find it and play the ball as it lies.) } } } This would return: Note, I'm using a Stack with Spacer() to push the bullet to the top of the grid row
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’24
NSTableView.reloadData(forRowIndexes:columnIndexes:) causes wrong subview layout when usesAutomaticRowHeights = true
I have a table view where each row has two labels, one left-aligned and one right-aligned. I would like to reload a single row, but doing so causes the right-aligned label to hug the left-aligned label. Before the reload: After the reload: Reloading the whole table view instead, or disabling automatic row height, solves the issue. Can a single row be reloaded without resorting to these two workaround? class ViewController: NSViewController, NSTableViewDataSource, NSTableViewDelegate { override func loadView() { let tableView = NSTableView() tableView.translatesAutoresizingMaskIntoConstraints = false tableView.dataSource = self tableView.delegate = self tableView.usesAutomaticRowHeights = true let column = NSTableColumn() column.width = 400 tableView.addTableColumn(column) let scrollView = NSScrollView(frame: CGRect(x: 0, y: 0, width: 500, height: 500)) scrollView.translatesAutoresizingMaskIntoConstraints = false scrollView.documentView = tableView view = scrollView Timer.scheduledTimer(withT
Topic: UI Frameworks SubTopic: AppKit Tags:
0
0
517
Jan ’24