Post

Replies

Boosts

Views

Activity

Comment on What is the replacement for deprecated contentEdgeInsets
my project is iOS 15 and is also Mac Catalyst. So I only have 1 code for iOS and macOS, no project settings switching. You should better include such an important info in the original post. Which version of Xcode are you using? Have you really set the DEPLOYMENT TARGET of both Project and Target to iOS 15/macOS 12? (If you are using the released version of Xcode 13, you cannot choose macOS 12.)
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’21
Comment on MPRemoteCommandCenter - Show Now Playing info
Are you sure you changed setupNowPlaying() to setupNowPlaying(artist: String, title: String, artwork: UIImage?) ? I tested my code before showing and unless you are doing something wrong, that sort of errors would never happen. Please check if you applied all the changes I have shown or show the full code of the view controller.
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’21
Comment on Open a View from the menu
When I created a new file with File > New > File... > Cocoa Class > Class: MySecondWindowController, Subclass of NSWindowController, no XIP selected, I could choose Both MyWindowController and MySecondWindowController in the pull down list of Custom Class > Class of the Identity Inspector of the window controller. Not a subclass of NSViewController, it should be a subclass of NSWindowController. And you should go to step 2 after you completely copy my code into MyWindowController.swift, the order of the shown steps have meaning.
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’21