How to change the name of ViewController in iOS

Akshay Devkate
CodeX
Published in
2 min readApr 11, 2021
Photo by Patrick Ward on Unsplash

You may want to change the name of default view controllers according to the project requirements to better understand what is exact need of that view controller. In order to track the application progress and understand what that specific view controller performs they must be named uniquely. To change the name of the view controller follow the simple steps.

Step 1: Right-click mouse and select the existing name of viewController in the below example it is ViewController

Step 2: Press and hold the control key on the keyboard and press the right click of the mouse.

Step 3: A drop-down menu will occur then select refactor in the dropdown. After selecting refactor another dropdown menu will occur select Rename in that.

Step 4: Now give name to the existing ViewController name as per your convenience (in the following example we renamed our ViewControllerfrom ViewController to AViewController) and select Rename button (in blue color in the upper right-hand corner of Xcode)

Rename ViewController

--

--