Comments (4)
The current solution let you do that. You don't have to use shared singleton, just do as you proposed. Use different instances of Typist in your controllers.
from typist.
Right, but encouraging the use of the singleton will lead to bugs. The "correct use" should be the one that is documented in the README. As it is now, the README doesn't mention this bug/limitation. Your package was included in "little bites of cocoa" and the author there also didn't point out that using the singleton is a bad idea, probably because it's not mentioned in the README.
from typist.
Hey Colin, what you described is true and I though that's was obvious, thus the comment in README about singleton vs new instance. Reason there is an option to use singleton at all is to give quick access to instance without having a dedicated class property (Typist().on(...
would deallocate immediately.) Having said that, your argument is totally valid. I'll reword docs and mention this limitation when working with singleton. βThank you!
from typist.
Updated README. This is not final decision though, I'll think more about singleton usage and it's benefits vs confusion factor.
from typist.
Related Issues (16)
- Installation Section HOT 1
- Make it possible to use typist in multiple View controllers at the same time HOT 4
- How to use options.animationCurve? HOT 7
- Add toolbar support HOT 2
- Build failure for Pod version 1.2.0 HOT 1
- CocoaPods HOT 1
- Add support for Swift Package Manager HOT 1
- Swift 4.2 Release HOT 3
- ios 12 changes HOT 2
- UIViewAnimationCurve(rawValue: 7) Error HOT 1
- Add support for Swift Package Manager in Xcode 11 HOT 2
- Please fix SMP support HOT 2
- SPM Doesn't work, please add 1.4.3 release HOT 4
- Any plans for Carthage support? HOT 2
- iOS10 Supported only? HOT 5
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 typist.