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
Comment on XCode 13 - Task not found in scope?
In this way it's impossible to use inside mac apps. Xcode 13 does not include macOS 12 SDK. You may need to wait the next Xcode which contains macOS 12 SDK.
Replies
Boosts
Views
Activity
Oct ’21
Comment on How can you pause a SpriteKit scene from SwiftUI, without reinitializing it every time?
Sorry, but I do not know what would be the best. In fact, I have never watched SpriteKit/SwiftUI apps tracking the paused state. But, if your code is working as expected, I cannot think of anything bad.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on What is the replacement for deprecated contentEdgeInsets
The released date of macOS 12 is expected to be announced in days, and the new version of Xcode including macOS 12 SDK will be published a few days before then. Or you can try with Xcode 13 beta 5, which includes macOS 12 SDK beta.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on Couldn't parse json file as array
Seems your check is not enough, longtitude is not longitude.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on Data struct not working
You should better start a new thread, including enough code as text using Code Block.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on How to add a search bar to a list?
As far as I tried, .searchable does not work when it is embedded inside a TabView. You may try adding nested NavigationView, but it may cause other issues. Better re-consider the overall view structure or find another way than searchable.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
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:
Replies
Boosts
Views
Activity
Oct ’21
Comment on What is the replacement for deprecated contentEdgeInsets
Please do not ignore my comment: Are testing my code under the condition where iOS 15 feature is available?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on Cannot find 'PhotogrammetrySession' in scope
Xcode 13.0 (12A233) does not contain macOS SDK 12.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on What is the replacement for deprecated contentEdgeInsets
You are talking about something which deprecated in iOS 15.0. Are testing my code under the condition where iOS 15 feature is available? And I never proposed you to use UIButton.Configuration.filled(). Can you tell me if there are any descriptions of filled() in UIButton.Configuration?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Limit width of wheel style picker on iOS
@Matthias2349120, then the behavior is different than the result I tried with the iOS 15 Simulator -- iPhone 8 Plus/iOS 15.0 (19A339). Can you clarify the condition to reproduce the behavior you describe?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on MPRemoteCommandCenter - Show Now Playing info
Sorry, but I do not know much about that. You may start with searching airplay in the developer site.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on UITableView refresh issue
Generally, you should not include two or more topics in one thread. And in this case, I do not understand what you want to achieve. You should better start a new thread and clarify what you want to do.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’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:
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Sep ’21