The Sea of Swift Extensions !

Before diving into the Sea, lets get some brief introduction about Swift Extensions.

Extensions add new functionality to an existing class, structure, enumeration, or protocol type. This includes the ability to extend types for which you don’t have access to the original source code (known as retroactive modeling).

Extensions in Swift can:

  • Add computed instance properties and computed type properties
  • Define instance methods and type methods
  • Provide new initializers
  • Define subscripts
  • Define and use new nested types
  • Make an existing type conform to a protocol

In Swift, you can even extend a protocol to provide implementations of its requirements or add additional functionality that conforming types can take advantage of.

Get Started

Really, Extensions are strongly needed in terms of code reusability. In our daily development life, we require lots of swift extensions. Some we know but some we don’t. So we use google to find the code and create the extensions as per our requirements. But let’s think that how it’ll easy if you find a place where you can get all the required extensions like a pool.

So here is the place where I’ll put all the swift extensions regularly and will build up a Sea.

Swift Extensions

Note: If you have more extensions then please share, I’ll fill up this sea.

Thank You. Happy coding! 👍



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store