• Skip to main content
  • Skip to primary sidebar

Ravi Shankar

Tweaking Apps

  • Swift
  • Tech Tips
You are here: Home / Xcode / How to rename default view controllers in XCode

How to rename default view controllers in XCode

June 11, 2012 By Ravi Shankar Leave a Comment

Xcode by default provides default name for the view controllers depending upon on the selected projects templates. For example, while creating Tabbed Application, you will find FirstViewController and SecondViewController as the name for default view controllers.

NewImage

Now if you want to provide a proper name to the FirstViewControllers and SecondViewControllers you can use the Rename option available under the Edit menu.

To rename FirstViewController,  

Step 1: Navigate to FirstViewController.h and select the name after interface keyword.

NewImage 

Step 2: Click the Edit menu then Refactor and select Rename from the list of available option.

NewImage

Step 3: Enter the name then select Rename related files and click the Preview button. This would display the list of files and location where the rename would affect.

Step 4: If you are happy with Preview then save the changes.

NewImage

By this way you can rename the default view controller and their related files (.h, .m and XIB) in Xcode.

Filed Under: Xcode Tagged With: rename, view controllers, Xcode

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

TwitterLinkedin

Recent Posts

  • How to block keywords in Jio broadband
  • How to disable opening an app automatically at login in Mac
  • How to set preferred Wifi network on Mac
  • Attribute Unavailable: Estimated section warning before iOS 11.0
  • How to recover Firefox password from Time Machine backup

Pages

  • About
  • Privacy Policy
  • Terms and Conditions

Copyright 2022 © rshankar.com

Terms and Conditions - Privacy Policy