Although it’s not as “pretty”, you can use stride
:
for var i in 0.stride(to: -1, by: -1) {
print(i)
}
More Related Contents:
- Add objective c code to swift file [closed]
- How can I debug ‘unrecognized selector sent to instance’ error
- How to change Status Bar text color in iOS
- How do I check when a UITextField changes?
- UITableView example for Swift
- Conditional Binding: if let error – Initializer for conditional binding must have Optional type
- Find out if Character in String is emoji?
- How to access a specific field from Cloud FireStore Firebase in Swift
- How to validate an e-mail address in swift?
- How to detect if app is being built for device or simulator in Swift
- How do I write dispatch_after GCD in Swift 3, 4, and 5?
- How to recognize swipe in all 4 directions
- Present modal view controller in half size parent controller
- Location Services not working in iOS 11
- UISearchBar increases navigation bar height in iOS 11
- Static Library and Swift
- How do I save a UIColor with UserDefaults? [duplicate]
- iOS linkedin authentication
- How do I create a new Swift project without using Storyboards?
- Linker Error in iOS (duplicate symbols for architecture x86_64)
- Remove objects with duplicate properties from Swift array
- Swift equivalent to `[NSDictionary initWithObjects: forKeys:]`
- “Creating an image format with an unknown type is an error” with UIImagePickerController
- UITableViewCell Buttons with action
- How can I programmatically find Swift’s version?
- How I can implement Login / Logout Navigation using UserDefaults in swift?
- Detect backspace Event in UITextField
- Swift optional chaining doesn’t work in closure
- How to use UnsafeMutablePointer in Swift 3?
- How do I do weak linking in Swift?