Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dasdom/swifttools
Xcode extension for Swift code
https://github.com/dasdom/swifttools
swift xcode xcode-extension
Last synced: about 2 hours ago
JSON representation
Xcode extension for Swift code
- Host: GitHub
- URL: https://github.com/dasdom/swifttools
- Owner: dasdom
- License: mit
- Created: 2020-03-14T08:23:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-26T16:58:24.000Z (4 months ago)
- Last Synced: 2024-06-27T11:38:29.298Z (4 months ago)
- Topics: swift, xcode, xcode-extension
- Language: Swift
- Homepage: https://apps.apple.com/de/app/swift-tools-for-xcode/id1503241323?l=en&mt=12
- Size: 2.36 MB
- Stars: 12
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftTools
Xcode extension for Swift codeIncluded tools:
## Align Equals
Before
```
enum Constants {
static let github = "dasdom"
static let twitterHandle = "dasdom"
static let answerToEverything = 42
}
```After
```
enum Constants {
static let github = "dasdom"
static let twitterHandle = "dasdom"
static let answerToEverything = 42
}
```## Copy Protocol Declarations For Selected Methods To Clipboard
Select these two methods
```
func foo(a: String, b: Int) {
// foobar
}
func bar(map: MKMapView) -> Int {
return 0
}
```and use this tool. The following code is copied to the clipboard:
```
protocol <#Protocol Name#> {
func foo(a: String, b: Int)
func bar(map: MKMapView) -> Int
}
```## Hex To UIColor
Select the following line in Xcode
```
// #af33d1
```and select the tool. The following line is added below the selected line:
```
let <#name#> = UIColor(red: 0.686, green: 0.200, blue: 0.820, alpha: 1.000)
```## Sort Imports
Before
```
import MapKit
import Foo
import UIKit
import Bar
import Foundation
```After
```
import Foundation
import MapKit
import UIKitimport Bar
import Foo
```# Author
Dominik Hauser
[@dasdom](https://twitter.com/dasdom)
# Licence
MIT