Tibor Bödecs 5/22/2018

Swift singleton design pattern

Read Original

This article discusses the Swift singleton design pattern, addressing why it's often criticized as an anti-pattern due to issues with global mutable states and side effects. It explains what a singleton is, its pitfalls, and provides guidelines on when it is appropriate to use one, such as for UIApplication or a Logger class, within iOS projects.

Swift singleton design pattern

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser