https://github.com/possen/placeviewcontroller
How to have a UIViewController without using implicit unwrap for instance variables.
https://github.com/possen/placeviewcontroller
implicit-unwraps ios swift uiviewcontroller
Last synced: 3 months ago
JSON representation
How to have a UIViewController without using implicit unwrap for instance variables.
- Host: GitHub
- URL: https://github.com/possen/placeviewcontroller
- Owner: possen
- Created: 2018-06-26T05:04:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-26T05:32:25.000Z (almost 7 years ago)
- Last Synced: 2025-01-06T02:24:18.168Z (5 months ago)
- Topics: implicit-unwraps, ios, swift, uiviewcontroller
- Language: Swift
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PlaceViewController
Sample app of how to have a UIViewController without using implicit unwrap for instance variables. I am calling it the `Place`
pattern, it gives you a place to put your instance variables,Advantages:
* Implicit unwraps are potentially going to crash.
* It can help with closures so you don't need to access `self`.
* Not much more effort than using `self`.
* Avoids the problem of ordering your initializers where the only reason you are making it implicitly unwrapped.