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
WordProcessorwith a Swift version and use the better way to handle the optional method - Declare the
WordProcessorDelegateprotocol in Swift and implement it in Objective-C (ViewController) - Mark the protocol’s methods as
optionaland remove the unneeded method implementations