Extract protocol
Last modified: 14 December 2022Language: Objective-C
Refactor | Extract/Introduce | Protocol
With the Extract Protocol refactoring you can create a new protocol based on the members of the current class.

Gif
Perform the Extract Protocol refactoring
Select the desired class in the editor.
Select Refactor | Extract/Introduce | Protocol from the main or context menu.
In the dialog that opens, type the name of the new protocol, select the members that you want to move there, and click Extract.
Before | After |
---|---|
|
|
Thanks for your feedback!
Was this page helpful?