Month: June 2012

  • How to only enable portrait orientation for iPhone App

    When developing an iPhone app in Xcode, if you have any requirement that only portrait orientation allowed then you can do the following. Step 1: Open the implementation file for editing. Step 2. Navigate to shouldAutorotateToInterfaceOrientation method. This methods is auto generated by Xcode while creating the project. Step 3: replace the return statement with return (interfaceOrientation == UIInterfaceOrientationPortrait);.…

  • How to rename default view controllers in XCode

    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. Now if you want to provide a proper name to the FirstViewControllers and SecondViewControllers you can use the Rename…

  • XCode – Open file in same window on double click

    Xcode by default displays project file in a seperate window when the user double clicks on the file. And if you want to change this behavior and to open the file in the same window as that of single click then you can use the options provided as part of Xcode Preferences. Step 1: Launch…