Posts

Post not yet marked as solved
0 Replies
191 Views
This might sound strange and but I'd really like to get this resolved. I first though this was the fault of a macos application that I developed. But later I noticed that it is practically applies to every application on the macbook I've got. If I press "Help" in the menu-bar, in any app on my mac. That app crashes. In some apps, it crashes directly, in some, it show a corrupt list first, then crashes. This is how it looks in Safari for example (1 second after pressing "Help"): Here's the stacktrace for Safari: 0 libobjc.A.dylib 0x181319c20 objc_msgSend + 32 1 Shortcut 0x1bd7aca5c -[SCTSearchManager hasNoResults] + 56 2 Shortcut 0x1bd7aea78 -[SCTSearchManager selectRowAfterTargetingItem:withMenu:] + 36 3 Shortcut 0x1bd7abdc4 SCTHelpMenuHandler + 508 4 HIToolbox 0x18afbb3a4 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1092 5 HIToolbox 0x18afba828 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 356 6 HIToolbox 0x18afba6b8 SendEventToEventTargetWithOptions + 44 7 HIToolbox 0x18b188878 SendItemEvent(MenuSelectData*, unsigned int, MenuData*, unsigned short) + 308 8 HIToolbox 0x18b050f10 UpdateMenuViewFocus(MenuSelectData*, MenuData*, short, short) + 568 9 HIToolbox 0x18b04be28 ViewFocusHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 520 10 HIToolbox 0x18afbb3a4 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1092 11 HIToolbox 0x18afba828 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 356 12 HIToolbox 0x18afba6b8 SendEventToEventTargetWithOptions + 44 13 HIToolbox 0x18b02f528 HIView::SendSetFocusPart(short, unsigned char, unsigned char, short*) + 248 14 HIToolbox 0x18b02f394 HIView::SetFocusPartInternal(short, unsigned char, unsigned char, short*, short, unsigned char, unsigned char) + 116 15 HIToolbox 0x18b02f14c HIView::SetFocusPart(short, unsigned char, unsigned char, unsigned int, FocusData*) + 240 16 HIToolbox 0x18b02ef90 HIViewSetFocus + 168 17 HIToolbox 0x18b05049c ChooseItem(MenuSelectData*, Rect const*) + 220 18 HIToolbox 0x18b1876e4 TrackMenuCommon(MenuSelectData&, unsigned char*, SelectionData*, MenuResult*, MenuResult*) + 800 19 HIToolbox 0x18b052c0c MenuSelectCore(MenuData*, Point, double, unsigned int, OpaqueMenuRef**, unsigned short*) + 348 20 HIToolbox 0x18b052a00 _HandleMenuSelection2 + 416 21 AppKit 0x184b09918 _NSHandleCarbonMenuEvent + 256 22 AppKit 0x184b0973c _DPSEventHandledByCarbon + 60 23 AppKit 0x1849b7104 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2232 24 Safari 0x1ac42a218 -[BrowserApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 228 25 AppKit 0x1849aaf7c -[NSApplication run] + 464 26 AppKit 0x1849823cc NSApplicationMain + 880 27 Safari 0x1ac791e24 SafariMain + 408 28 dyld 0x18135bf28 start + 2236
Posted
by deverlof.
Last updated
.
Post not yet marked as solved
1 Replies
540 Views
Since updating to Xcode 15, I've noticed that the app is SUPER slow while running with the debugger. I've figured out that it seems to be due to that the debugger is defaulting to wifi-connection, even tho the phone is connected via cable. I can fix the slowness by turning off wifi on my phone, because then the debugger will use the cable and the app will run as normally (pre Xcode 15.0). What's the cause of having the "Connect via network"-checkmark disabled? Why can't I just uncheck it and do my own choice?
Posted
by deverlof.
Last updated
.
Post not yet marked as solved
1 Replies
1.4k Views
I get different to the top and bottom of the cell when I use UIListContentView in a subclass versus if I use UICollectionViewListCell directly. Here's how I setup directly UICollectionViewListCell:         let reg = UICollectionView.CellRegistration<UICollectionViewListCell, EventCellViewModel> { cell, indexPath, model in             var content = cell.defaultContentConfiguration()             content.text = model.titleText             content.secondaryText = model.subtitleText             var accessories: [UICellAccessory] = [.disclosureIndicator(displayed: .always, options: .init(tintColor: .nicePurpleColor))]             accessories.append(.customView(configuration: .init(customView: UIImageView(image: UIImage(systemName: "bell")), placement: .trailing())))             cell.accessories = accessories             cell.contentConfiguration = content         } Here's how I use it in my subclass: Initialize it private lazy var listContentView = UIListContentView(configuration: defaultListContentConfiguration()) Setup the views:     private func setupViewsIfNeeded() {         guard accessories.isEmpty else { return }         accessories = [             .disclosureIndicator(displayed: .always, options: .init(tintColor: .nicePurpleColor)),             .customView(configuration: .init(customView: sswitch, placement: .trailing()))         ]         contentView.addSubview(listContentView)         listContentView.translatesAutoresizingMaskIntoConstraints = false         NSLayoutConstraint.activate([             listContentView.topAnchor.constraint(equalTo: contentView.topAnchor),             listContentView.leftAnchor.constraint(equalTo: contentView.leftAnchor),             listContentView.rightAnchor.constraint(equalTo: contentView.rightAnchor),             listContentView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),         ])     } and then lastly configure it:     override func updateConfiguration(using state: UICellConfigurationState) {         setupViewsIfNeeded()         var content = defaultListContentConfiguration().updated(for: state)         content.text = state.viewModel?.titleText         content.secondaryText = state.viewModel?.subtitleText         content.axesPreservingSuperviewLayoutMargins = [.both]         listContentView.configuration = content         sswitch.isOn = state.viewModel?.isEnabledForCalendar ?? false     } /best regards, David
Posted
by deverlof.
Last updated
.
Post not yet marked as solved
0 Replies
628 Views
I've adopted the techniques from 'Modern Collection Views' and I get a strange jump in the cell when the collection view appears on screen. The cells are slightly too small, and grows a couple of pixels. It looks like it's the spacing between the text and the secondaryText of the .subtitleCell() the grows from zero to some pixels. Some cell also jumps a bit the first time it's updated. Code is attached below. Example.swift - https://developer.apple.com/forums/content/attachment/76dcbb4c-a86b-4a79-8700-727c1ed96b40
Posted
by deverlof.
Last updated
.