Post

Replies

Boosts

Views

Activity

Reply to Popovers are broken on Catalyst builds without portrait support
This is still a problem on Mac Catalyst 18.6 (macOS Sequoia 15.6). The original "Steps to Reproduce" from the original post are still valid and reproduce the issue. A simple code that shows the issue: class RootViewController { func presentPopup(action: UIAction) { if traitCollection.userInterfaceIdiom == .mac { let viewController = UIViewController() viewController.view.backgroundColor = .systemYellow viewController.preferredContentSize = CGSize(width: 300, height: 200) viewController.modalPresentationStyle = .popover viewController.popoverPresentationController?.sourceItem = action.sender as? UIPopoverPresentationControllerSourceItem viewController.popoverPresentationController?.delegate = self viewController.popoverPresentationController?.permittedArrowDirections = .up present(viewController, animated: true) } } } extension RootViewController: UIPopoverPresentationControllerDelegate { func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle { return .none } } Once you add Portrait as a supported orientation under the iPad Orientation, it works. Another, unrelated issue, is that you get three warnings when the controller is presented: UIScene property of UINSSceneViewController was accessed before it was set. UIScene property of UINSSceneViewController was accessed before it was set. UIScene property of UINSSceneViewController was accessed before it was set. However the warnings don't affect the popup functionality.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
4d
Reply to Error when clicking on TextField : CLIENT ERROR: TUINSRemoteViewController does not override -viewServiceDidTerminateWithError: and thus cannot react to catastrophic errors beyond logging them
I'm seeing the same error with simple text fields. macOS Sonoma 14.6.1, Xcode 16.0 (16A242). CLIENT ERROR: TUINSRemoteViewController does not override -viewServiceDidTerminateWithError: and thus cannot react to catastrophic errors beyond logging them
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
Reply to Xcode 16 beta 5 MainActor errors in a Swift 6 project while working in beta 4
Xcode 16.1 beta seems to be having the same issue. To test, I started from the default "Game" project template with SpriteKit and changed to GameScene.swift file to something simple like this: // GameScene.swift import SpriteKit import GameplayKit class GameScene: SKScene { // GameScene is @MainActor as a subclass of SKNode var label : SKLabelNode = SKLabelNode(text: "Initial text") override func didMove(to view: SKView) { addChild(label) } } @MainActor final class State: GKState { unowned private let scene: GameScene init(scene: GameScene) { self.scene = scene } override func didEnter(from previousState: GKState?) { scene.label.text = "Entered State" // Main actor-isolated property 'label' can not be referenced from a nonisolated context // Main actor-isolated property 'text' can not be mutated from a nonisolated context } } It seems that the @MainActor tag on the class State is not working for methods that were overridden. This is most likely because GKState is not marked so its methods are nonisolated. But what is the solution in this case?
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’24
Reply to Possible to batch SKEmitterNodes?
I noticed the same thing, every SKEmitterNode increases the draw call count. Were you able to do anything to batch these draw calls? In my case, all these SKEmitterNodes use the same texture, default blend mode, zero particleColorBlendFactor and have the same targetNode with the same particleZPosition.
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Apr ’23