Post

Replies

Boosts

Views

Activity

Comment on Is DragGesture buggy or am I messing something up?
That is now solved in the last code I sent. Problem was because angle value jumped when crossing some limits. So it's not an atan2 issue, but in its use: when value.translation changes sign, there is a steep jump from -π/2 to π/2. Tell if that's OK now and don't forget to close the thread on last answer if it works.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’23
Comment on Problem with UIBarButton menu
So the question is: who is self referring to ? Could you check ? Maybe it is to an instance that does not exist anymore. Could you try adding a capture of self ? UIAction(title: "Edit Value", image: UIImage(systemName: "square.and.pencil"), handler: { [self] (_) in
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’23
Comment on Is DragGesture buggy or am I messing something up?
That is now solved in the last code I sent. Problem was because angle value jumped when crossing some limits. So it's not an atan2 issue, but in its use: when value.translation changes sign, there is a steep jump from -π/2 to π/2. Tell if that's OK now and don't forget to close the thread on last answer if it works.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Have 2 Task with for loops run concurrently?
Thanks for all the feedback. Is issue solved now ? If so, don't forget to close the thread to keep forum clean.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Is it possible to serialize/deserialize closures in swift?
So, did you answer the question ? If so, don't forget to close the thread.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Is DragGesture buggy or am I messing something up?
Corrigendum: in fact the real angle is the one betwwen the vertical rect (y-axis) and the vector, not between vector and x-axis as drawn on figure.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Extra argument 'selection' in call error in ListView.
Could you show the code of the delete function ? The id you use is probably different from the id in ForEach.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on how to implement a tableview.notification in Swift
You mean Xcode 14.2 ? My question is: where did you find rowSelectionDidChange notification name ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Problem with UIBarButton menu
Could you show the complete viewDidLoad ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on NavigationLink and .navigationDestination Hang and Infinite Loop
The problem does not show in Preview, surprisingly…
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Problem with UIBarButton menu
The point would be to be able to test the code to find out the issue. What is self in self.edit ? What if you replace self.edit() by a call to a dummy func as func test() { print("Test", self) }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Problem with UIBarButton menu
Could you show the complete code of the class ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Problem with UIBarButton menu
So the question is: who is self referring to ? Could you check ? Maybe it is to an instance that does not exist anymore. Could you try adding a capture of self ? UIAction(title: "Edit Value", image: UIImage(systemName: "square.and.pencil"), handler: { [self] (_) in
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on What "Your app playground must be run on Xcode 14 on macOS 13" means?
That's much clearer than my explanation. Would be great to have this in the challenge rules.
Replies
Boosts
Views
Activity
Mar ’23
Comment on Problem with UIBarButton menu
What do you get in log when you print self.vLocal?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Using xcode 14.2 to code for the apple student swift challenge
@NinaGit You may find some information here as well: https://developer.apple.com/forums/thread/727471
Replies
Boosts
Views
Activity
Apr ’23
Comment on Why wont my decoder parse .json files
@techboss_11123 WHere does this code fit ? What do you show here ? And you do not answer on what T is and if it's an array… So please explain more clearly.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23