Comments (3)
Interesting concept. I've thought about it in other lifecycle mechanisms, but not view controllers.
This will be different because UIViewController lifecycle methods are subclassed, rather than delegated. It's an interesting problem though.
Can you set the stage with a use case for how you would interact with these methods? I'm assuming from outside the controller, correct? Is there a particular navigation architecture (i.e. VIPER) that would benefit from this?
from closures.
Hello Sir!
You're very right, indeed.
Model View Presenter for instance or any other architecture that separates the view from who controls it like VIPER, or MVVM or whatever. The presenter would be able to control everything from outside it, although I know it might be coupled to a specific type but I was only curious about all this concept.
Right now I'm using RxSwift with some extension for UIViewController that allows me to do such thing:
https://github.com/devxoul/RxViewController
from closures.
Let me think for a little about how to do this. Stay tuned.
from closures.
Related Issues (20)
- Clear handler? HOT 8
- UITextView HOT 1
- Use of unresolved identifier 'dismissFromPresenting' HOT 3
- support UIMenuItem
- button 的点击事件不行 HOT 1
- NotificationCenter? HOT 2
- UIView not release HOT 2
- If you just need some ui tap callback by closure, you can think of using this project
- App Store rejection for not including NSPhotoLibraryUsageDescription HOT 2
- cocoapod 找不到 Closures 这个库
- 我的项目最低版本是ios8
- UIImagePickerController: Use of unresolved identifier 'dismissFromPresenting' HOT 1
- Can you use this in a mixed Obj C and Swift project? HOT 1
- Support Xcode 10.2 with Swift 5.0 HOT 1
- Swift Package Manager support HOT 4
- Memory leak
- Duplicate case in TableViewDelegate.responds(to:)
- is Closures doesn't support custom-observed property in swift ? HOT 1
- v HOT 1
- Unit testing code coverage inside the closure HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from closures.