AppCode 2020.2 Help

Inline

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

  1. Place the caret within 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.

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: 30 June 2020