https://github.com/cellular/xcodeextensionoutletfixer-swift
An Xcode Source Editor Extension to make IBOutlets weak, private and optional
https://github.com/cellular/xcodeextensionoutletfixer-swift
Last synced: 8 months ago
JSON representation
An Xcode Source Editor Extension to make IBOutlets weak, private and optional
- Host: GitHub
- URL: https://github.com/cellular/xcodeextensionoutletfixer-swift
- Owner: cellular
- License: mit
- Created: 2019-05-28T12:37:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-28T12:48:59.000Z (about 7 years ago)
- Last Synced: 2025-02-15T11:19:51.082Z (over 1 year ago)
- Language: Swift
- Size: 16.6 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Xcode Source Editor Extension: "Outlet Fixer"
An Xcode Source Editor Extension to make IBOutlets weak, private and optional
Xcode Source Editor Extensions are located in Menu -> Editor.
Select "Fix IBOutlets" to change all of your IBOutlets in your currently selected file to weak, private and optional.
It will also update your code to make sure to use your outlets as optionals.
**Example**
```Swift
@IBOutlet weak var myView: UIView!
[...]
myView.backgroundColor = .blue
```
... will be modified to:
```Swift
@IBOutlet private weak var myView: UIView?
[...]
myView?.backgroundColor = .blue
```