This is a demo project for the video about the similarities, differences, and efficient use of Swift and Objective-C protocols.
You’ll find different stages of the project in separate branches.
- Create a starter project
- Implement the Objective-C protocol (
StringManipulatorProtocol
) in the Swift object (StringManipulator
) - Fix the crash that occurs when the non-implemented optional method is called
- Replace
WordProcessor
with a Swift version and use the better way to handle the optional method - Declare the
WordProcessorDelegate
protocol in Swift and implement it in Objective-C (ViewController
) - Mark the protocol’s methods as
optional
and remove the unneeded method implementations