Post

Replies

Boosts

Views

Activity

Reply to Is there a way to detect when an SKPhysicsBody stops bouncing?
A way would be to observe velocity. When it is zero, object is at rest. You need to detect it is really at rest and not just bouncing, by reading velocity at 2 close time points. There is even a simpler way: use isResting property. This property is automatically set to true by the physics simulation when it determines that the body is at rest. This means that the body is at rest on another body in the system. Resting bodies do not participate in the physics simulation until an impulse is applied to the object or another object collides with it. This improves the performance of the physics simulation. If all bodies in the world are resting, the entire simulation is at rest, reducing the number of calculations that are performed by the physics world.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to Unknown class QuoteDetailViewController in Interface Builder file with Xcode 12
You put the prepare in the wrong class. override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. if let quoteViewController = segue.destination as? QuoteDetailViewController { if let selectedQuote = sender as? String { quoteViewController.quote = selectedQuote } } } It should be in the QuoteTableViewController and not in QuoteDetailViewController. I changed and now one get the label. In fact, there is no segue from QuoteDetailViewController. Note: the code on GitHub is quoteViewController.quote = selectedQuote not quoteViewController.title = selectedQuote Just change and get :
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to Use Apple Watch as a view finder with ARKit
You can of course send messages from iPhone to Watch. This could be an image. But I don't know it is possible to send live (animated) view. Did you see this WWDC session ? https://developer.apple.com/videos/play/wwdc2021/10003/ If I understand correctly this table, only way to have (audio) streaming is sockets to server. Could it meet your need ?
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to Why do I get touchesCanceled all the time?
It is surprising to have Cancel for a TapGesture. Doc shows that for such discrete gesture, there is not such a state (just failed, but that may come from a cancel):       https://developer.apple.com/documentation/uikit/touches_presses_and_gestures/implementing_a_custom_gesture_recognizer/about_the_gesture_recognizer_state_machine
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’21
Reply to Is there a way to detect when an SKPhysicsBody stops bouncing?
You define the equation parameters for movement. Can't you compute when it stops bouncing ? I agree that may be complicated. But maybe some estimate ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Is there a way to detect when an SKPhysicsBody stops bouncing?
A way would be to observe velocity. When it is zero, object is at rest. You need to detect it is really at rest and not just bouncing, by reading velocity at 2 close time points. There is even a simpler way: use isResting property. This property is automatically set to true by the physics simulation when it determines that the body is at rest. This means that the body is at rest on another body in the system. Resting bodies do not participate in the physics simulation until an impulse is applied to the object or another object collides with it. This improves the performance of the physics simulation. If all bodies in the world are resting, the entire simulation is at rest, reducing the number of calculations that are performed by the physics world.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Converting AVCapturePhoto to UIImage loses its metadata
Can't you save metaData separately and use those you need later ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to macOS Monterey v.12 conflict with Xcode
Seems others have experienced the same issue: https://developer.apple.com/forums/thread/684475 Did you file a bug report ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to New tag …PWA
When using acronyms, it's good to explicit "Progressive Web App"
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Unknown class QuoteDetailViewController in Interface Builder file with Xcode 12
You put the prepare in the wrong class. override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. if let quoteViewController = segue.destination as? QuoteDetailViewController { if let selectedQuote = sender as? String { quoteViewController.quote = selectedQuote } } } It should be in the QuoteTableViewController and not in QuoteDetailViewController. I changed and now one get the label. In fact, there is no segue from QuoteDetailViewController. Note: the code on GitHub is quoteViewController.quote = selectedQuote not quoteViewController.title = selectedQuote Just change and get :
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to App build failed with my App name correct, now cant rebuild.
I do not fully understand what you've entered in the AppstoreConnect so far…     At what stage of submission process do you get the error ?    In such a case, I would contact support (phone or web) to ask for advice.     https://developer.apple.com/contact
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Invalid code signature problem with Xcode12
Device Management is when you are in a MDDM environment. If the problem is the same as for the initial post, you should open the project in Xcode, select the project name (blue icon), select "TARGEYS" go to signing and capabilities Tab and check information there.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Initialize UIImage with SVG file
There is no such initialiser. But UIWebView has: https://stackoverflow.com/questions/32808901/svg-url-to-uiimage-ios https://stackoverflow.com/questions/35691839/how-to-display-svg-image-using-swift
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Use Apple Watch as a view finder with ARKit
You can of course send messages from iPhone to Watch. This could be an image. But I don't know it is possible to send live (animated) view. Did you see this WWDC session ? https://developer.apple.com/videos/play/wwdc2021/10003/ If I understand correctly this table, only way to have (audio) streaming is sockets to server. Could it meet your need ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to How to reply with hide my email / how to initiate an email using hide my email
Did you see WWDC video on the topic ? Or this link may be useful as well      h t t p s : / / w w w .cnet.com/tech/services-and-software/keep-spam-out-of-your-inbox-with-apples-new-hide-my-email-feature-heres-how/
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to How to Hide/Show StackView form code
Create an IBOutlet for the stackView and connect to the StackView in IB. @IBOutlet weak var myStack: UIStackView! And use it as needed in code. myStack.isHidden = true myStack.isHidden = false
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Crash but I have no idea what's been going wrong
Could you show the code related to the table view ? Including those which deal with layout. That would help.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Why do I get touchesCanceled all the time?
It is surprising to have Cancel for a TapGesture. Doc shows that for such discrete gesture, there is not such a state (just failed, but that may come from a cancel):       https://developer.apple.com/documentation/uikit/touches_presses_and_gestures/implementing_a_custom_gesture_recognizer/about_the_gesture_recognizer_state_machine
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Why do I get touchesCanceled all the time?
Could you show more code: how you create the tapGesture, how you detect cancel. Why don't you connect directly the tapGesture to an IBAction from IB ? Is it called from SwiftUI code ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21