Tag: Xcode

  • Simple UITableView and UIAlertView example

    In this article, we are going to see how to create a simple UITableView for displaying data. And display an alert on selection of any row using UIAlertView. Launch Xcode, Click File > New Project and select Single View Application as the project template. Enter the project details for Product Name, Organization Name, Company Identifier…

  • How to add annotation to MapView in iOS

    This article provides the steps for adding annotation to a MapView in iOS Updated: – Click here for the updated article in Swift Create a new Xcode Project – File > New > Project. Select the template for the project as Singe View Application under iOS > Application. Then provide the required details in the…

  • How to change page scaling in Xcode

    Xcode provides option to increase or decrease the page scaling. This page scaling option is available as part of the Page Setup. This feature is quite useful when you want reduce the number of pages used for printing any Objective-C code. The default page scale is set to 100% and you can change this by…

  • Reduce the time taken for searching iOS documentation using Xcode

    This tip is for iOS developers who want to reduce the time taken while searching iOS documentation using Xcode. Documentation under the Xcode organiser window by default shows information on OS X as well. If you are not a Mac developer then you can turn off the documentation related with OS X. Step 1: Launch…

  • Create an example iOS Project using Xcode

    We had already covered the basic overview of Xcode and now we are going see the steps required for creating an sample iOS Project that displays Welcome message on Xcode simulator. Topics Covered Create New Project using Xcode. Add label control to Interface Builder. Edit label to add Welcome message Choose simulator in Xcode. Compile,…

  • 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…

  • How to disable code completion suggestion in Xcode

    Xcode is one of the powerful IDE for IOS development and by default it supports code completion suggestion. Code completion feature suggests users with possible code substitution when you start typing first few letters of code in Xcode editor. For example, if you have UILabel reference variable and start typing “t” after the dot then…