AppCode 2021.2 Help

Inline

The Inline refactoring lets you reverse the Extract refactoring for a method or variable.

Use the Inline refactoring to reverse the extract refactoring.

  1. Place the caret at the code fragment you want to inline.

  2. Press ⌃ ⌥ N. Alternatively, select Refactor | Inline from the main or context menu.

  3. In the dialog that opens, click View usages if you want to preview the refactoring results. To apply the changes, click Inline.

  4. Below is the result of inlining a method.

    BeforeAfter
    - (void)setupUI { // ... // This method will be inlined [self setupLabel]; } - (void)setupLabel { self.labelInfo.textColor = [UIColor blackColor]; self.labelInfo.text = @"Your email and password"; }
    - (void)setupUI { // ... // Inlined code self.labelInfo.textColor = [UIColor blackColor]; self.labelInfo.text = @"Your email and password"; }
    Last modified: 29 September 2021