Post

Replies

Boosts

Views

Activity

Weird shadowing on changing objects on a transparent NSWindow?
Hi there! I'm working on a program that runs on a transparent NSWindow. On this window, there are NSImageViews, which change based on certain conditions automatically as the app runs. One small issue however, when these ImageViews change, they leave weird artefacts on the NSWindow. For example, when changing from the top image to the bottom; it leaves a strange, translucent shadow in its place - as you can see in the images. I've tried doing stuff like resetting the opacity and shadow of the window by running this code when the images change (run from a function in the NSViewController): view.window?.isOpaque = true view.window?.isOpaque = false view.window?.hasShadow = false view.window?.hasShadow = true But the artifacts remain on the window. I've also tried redrawing the NSView and NSImageViews, but to no avail. Is there anything I can do to prevent this from happening? Thanks! In case it's relevant, this is the code I'm using to make the NSWindow transparent, called from windowDidLoad: window?.isOpaque = false window?.backgroundColor = NSColor.clear
0
0
518
Dec ’22
Is WidgetKit capable of displaying fonts besides the system font?
Hi, I'm attempting to display custom (but already built-into the OS) fonts in my macOS WidgetKit extension. Those are American Typewriter and Avenir. Despite it working perfectly fine in the base app, I'm finding it impossible to get it working in the widget. I've used endless variations of things like Font.custom("Avenir", size: 25).bold(), but it just won't work. It appears perfectly in the WidgetKit simulator, but when ran after archiving the app and putting it in my Applications folder, it won't. When the UserDefaults settings it uses are set to one of these fonts on launch, the widget will open, but it will be in some kind of Arial placeholder font. If I change the UserDefaults key to one of these fonts while the widget is alive and reload it, it will crash completely. This doesn't happen when displaying the System fonts, or when changing between System Default and System Serif. Here is an example of the code I'm using to get the font (these UserDefaults values have been confirmed to be correctly synchronised): static let getSmallFont: Font = {         switch UserDefaults(suiteName: "com.timekeeper")?.string(forKey: "font") {         case "modern": return Font.custom("Avenir", size: 25).bold()         case "fancy": return .system(size: 25, weight: .bold, design: .serif)         case "old": return Font.custom("American Typewriter", size: 25).bold()         case nil: return .system(size: 25, weight: .bold, design: .default)         default: return .system(size: 25, weight: .bold, design: .default)         }     }() and the simple code I use to add a Text with that font to my view: Text(entry.date, style: .time) .font(WidgetEntryView.getSmallFont)
0
0
549
Sep ’22
SKScene jitters/lags when a new SKSpriteNode is added
I'm constructing a Swift Playground with UIKit that contains an SKScene. After creating the code I'm planning to use within an Xcode project, I tried to adapt it into my Playground. I encountered an issue while running the Playground - when a new SKSpriteNode is added to the Scene, the new and existing nodes jitter, freeze, and lag for a split-second, the FPS counter drops to around 49fps, then returns to smooth 60fps. No errors or warnings are spat, and the console is completely empty. The scene in the project didn't have this issue, and I can't recreate it on another project - even when I directly copy-paste the code from the Playground to the project. I've seen other posts with this question - and made a few myself elsewhere - and there's been no responses. I desperately need help for this as nothing I've tried is working and the deadline is in a few days! Thanks! The code that is in effect for this SKScene is below. class SimulatorController: UIViewController { override func loadView() { let view = SKView() let scene = GameScene(size: view.bounds.size) view.showsFPS = true view.showsNodeCount = true view.ignoresSiblingOrder = true scene.scaleMode = .resizeFill view.presentScene(scene) self.view = view } } class GameScene: SKScene { override func didMove(to view: SKView) { run(SKAction.repeatForever(SKAction.sequence([ SKAction.run(addNeutron), SKAction.wait(forDuration: 1) ]) )) } func random() -> CGFloat { return CGFloat(Float(arc4random()) / 0xFFFFFFFF) } func random(min: CGFloat, max: CGFloat) -> CGFloat { return random() * (max - min) + min } func addNeutron() { let neutron = SKSpriteNode(imageNamed: "neutron.heic") neutron.size = CGSize(width: 20, height: 20) neutron.physicsBody = SKPhysicsBody(rectangleOf: neutron.size) neutron.physicsBody?.isDynamic = true let actualX = random(min: 0, max: size.width) let actualY = random(min: 0, max: size.height) neutron.position = CGPoint(x: actualX, y: actualY) addChild(neutron) let actualDuration = random(min: CGFloat(2.0), max: CGFloat(4.0)) let actualX2 = random(min: 0, max: size.width) let actualY2 = random(min: 0, max: size.height) let actionMove = SKAction.move(to: CGPoint(x: actualX2, y: actualY2), duration: TimeInterval(actualDuration)) let actionMoveDone = SKAction.removeFromParent() neutron.run(SKAction.sequence([actionMove, actionMoveDone])) } }
2
0
1.2k
Apr ’22
"Balance Carried Forward" in App Store Connect for a few months.
Context: in Australia, new to paid apps. I just noticed that I was meant to receive $31AUD from sales across multiple countries in early November, and all it says in App Store Connect is Balance Carried Forward, and there's nothing from Apple in the bank. How come I haven't gotten my money after a month and a half? It also skipped over a $0.85AUD payment in October, and a $0.31 payment earlier this month with the same message of "Balance Carried Forward". Is this because it hasn't reached the $150USD level it needs to before it pays out? I would assume so, but some of the payments that have been skipped are from countries where the $0.02USD payment threshold applies. How do I get this fixed and get the money into my account? Thanks!
0
0
659
Dec ’21
Trends tab in App Store Connect not loading anymore on the Mac version of Safari 13.
Hi there, Recently I updated to Safari 13 on my M1 MacBook Pro on macOS Big Sur 11.6 and since then, I noticed an issue where the Trends tab in App Store Connect doesn't load correctly. I also tested it on my iPhone with iOS 15, and it appeared on there perfectly fine. Anyways, I tried to fix the issue by clearing website data for apple.com, consistently refreshing the tab, logging out and back into Connect, restarting, etc. I even tried to load the mobile version by clicking the Develop menu item in Safari > User Agents > Safari - iOS 14.0 - iPhone, and that appeared blank too. Anyone experiencing this as well? Did you find a fix? Thanks!
4
0
2.3k
Sep ’21
"In Review" delays lasting about a week per update on the Mac App Store
For the past few weeks, I've noticed a strong delay on the Mac App Store when it comes to the review process. More specifically, new apps — and even updates to existing apps — are getting stuck "In Review" for about a week at a time, then getting approved as if nothing happened. This issue is only apparent on the Mac App Store, and not on the iOS store. Anyone else experiencing these kinds of delays recently? Thanks!
2
0
1k
Sep ’21
Touch Bar appears blank when my app is run, even though I've added lots of elements to the Touch Bar in Storyboard.
I'm creating an app that uses the Touch Bar, I set up the UI, added a Touch Bar to the correct view controller and ran it, but the Touch Bar on my actual MBP was blank. I don't have any Touch Bar simulators open, I've tried adding it to the Window Controller instead of the View Controller, but nothing. Using: Xcode 12.5.1 MacBook Pro, M1 (Big Sur 11.5.1) Storyboards & Swift. Any suggestions? Thanks! :)
0
0
520
Aug ’21