About 17,300,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. bash - How do I run a terminal command in a Swift script? (e.g ...

    I want to replace my CI bash scripts with swift. I can't figure out how to invoke normal terminal command such as ls or xcodebuild #!/usr/bin/env xcrun swift import Foundation // Works …

  3. xcode - Swift: Understanding // MARK - Stack Overflow

    What is the purpose of writing comments in Swift as: // MARK: This is a comment When you can also do: // This is a comment What does the // MARK achieve?

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

    Oct 19, 2014 · Is there a way to to do and/or in an if statement in swift. eg/ if a > 0 and i == j or f < 3: //do something can we do that in swift? Thanks in advance

  5. Get nth character of a string in Swift - Stack Overflow

    The swift string class does not provide the ability to get a character at a specific index because of its native support for UTF characters. The variable length of a UTF character in memory …

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

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

  7. ios - When to use @objc in Swift? - Stack Overflow

    In Swift, I see some methods like: @objc private func doubleTapGestureRecognized(recognizer: UITapGestureRecognizer) I was wondering, when to use @objc? I read some documents, but …

  8. 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 …

  9. ios - How to make HTTP request in Swift? - Stack Overflow

    I read The Programming Language Swift by Apple in iBooks, but cannot figure out how to make an HTTP request (something like cURL) in Swift. Do I need to import Obj-C classes or do I just …

  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...