Back to Developer Roadmap

Extensions

src/data/roadmaps/swift-ui/content/[email protected]

4.0831 B
Original Source

Extensions

Extensions in Swift are a way to add new functionality to an existing class, structure, enumeration, or protocol type. They allow you to extend types even if you don't have access to the original source code. Extensions can add computed instance properties, define instance methods and type methods, provide new initializers, define subscripts, define and use new nested types, and make an existing type conform to a protocol.

Visit the following resources to learn more: