AppCode 2018.3 Help

Extract protocol

With the Extract Protocol refactoring you can create a new protocol based on the members of the current class. The created protocol will be implemented automatically.

Extract a protocol

  1. Select a in the Project view, Structure view, or place the caret anywhere within a in the editor.

  2. On the main menu or from the context menu of the selection, choose Refactor | Extract | Protocol. The dialog appears.

  3. Specify the name for the new protocol.

  4. Select the members you want to be listed in the protocol in the members area.

  5. Click Extract to proceed.

  6. Click Refactor when ready. If AppCode shows you a Refactoring Preview in the Find tool window, review the suggested changes. To have the interface extracted and the proposed changes applied, click Do Refactor.

Last modified: 28 March 2019

See Also