About 23,100,000 results
Open links in new tab
  1. Swift await/async - how to wait synchronously for an async task to ...

    Feb 3, 2022 · 77 I'm bridging the sync/async worlds in Swift and doing incremental adoption of async/await. I'm trying to invoke an async function that returns a value from a non async …

  2. How does one declare optional methods in a Swift protocol?

    415 In Swift 2 and onwards it's possible to add default implementations of a protocol. This creates a new way of optional methods in protocols.

  3. swift if or/and statement like python - Stack Overflow

    swift if or/and statement like python Asked 11 years, 1 month ago Modified 5 years, 6 months ago Viewed 80k times

  4. Rounding a double value to x number of decimal places in swift

    Dec 7, 2014 · The nature of Swift's Double appears to be that it can be imprecise – because of the way it's stored/accessed in binary, even using this rounding function will not return a …

  5. ios - How to format localised strings in Swift? - Stack Overflow

    How to format localised strings in Swift? Asked 9 years, 9 months ago Modified 8 months ago Viewed 40k times

  6. Swift CLI app 'main' attribute cannot be used in a module that …

    Aug 21, 2022 · "The Swift compiler uses either the type marked with \@main or a main.swift file as the entry point for an executable program. You can use either one, but not both — rename …

  7. ios - How to create a delay in Swift? - Stack Overflow

    Dec 17, 2014 · 51 In Swift 4.2 and Xcode 10.1 You have 4 ways total to delay. Out of these option 1 is preferable to call or execute a function after some time. The sleep () is least case in use. …

  8. What is the difference between `let` and `var` in Swift?

    Jun 3, 2014 · 374 What is the difference between let and var in Apple's Swift language? In my understanding, it is a compiled language but it does not check the type at compile time. It …

  9. Can you run and compile Swift code on Windows? - Stack Overflow

    Apr 17, 2016 · With the release of Swift 3.0 being available for Mac OS and Windows, does this mean you can compile and run Swift code on Windows? If so what compiler do you use for …

  10. How can I use Timer (formerly NSTimer) in Swift? - Stack Overflow

    The renaming happened in Swift and other answers already have done the update...