Author: Ravi Shankar

  • Code Example – Check for Prime Number Objective C

    This is a simple Objective C program written to check whether a number is a Prime number. // // main.m // PrimeNumbers // // Created by Ravi Shankar on 10/02/12. // Copyright (c) 2012 rshankar.com. All rights reserved. // #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { @autoreleasepool {    int number;…

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

  • How to set Organization name for Xcode Project

    When ever a new project is created in Xcode, the projects files like header and implementation files will have auto generated comment section at the top of the file. This comment section will have information such as file name, Project name, Author and Organization name. // // ViewController.h // Welcome // // Created by Ravi…

  • iPad App that prints Welcome Message

    Here is an example of writing an iPad app that prints a Welcome message. Launch Xcode, click File -> New -> New Project. Now select the template for the project as Single View Application. Provide the details for your project, like Product Name, Company Name then choose the device for which you are writing the…

  • How to set Keynote as default application for PPT file

    Mac OS X Lion is pre-installed with OpenOffice software and this is set as the default application for opening any PowerPoint presentation file. Mentioned below are the steps required to set Apple Keynote as the default application for opening PPT file. Launch Finder application on Mac and locate the PPT file. Right click on the…

  • Dissecting Objective-C program

    We have already seen couple of examples in Objective-C like writing your first program in Objective-C and adding Objective-C classes. Now let us try and analyze the code to learn basic coding on Objective-C program. Adding Comments The very basic thing to learn is any programming language is “how to add comments”. In Objective-C you…

  • Basic tutorial – Adding Objective-C Class using Xcode

    Let us see how to add a class in Objective-C by looking at an example that provides basic functionality of adding two numbers. In this example we will be using Xcode for development similar to the earlier post on first program in Objective C using Xcode. This program is going to have to three main…

  • My fiirst program in Objective C using Xcode

    This tutorial is about writing a basic and simple program in Objective C using Xcode. Let us see an example program that prints “My First Program” in the Console Window. Click the File menu on Xcode, then navigate to New -> New Project. This would display the following Choose a template window. Now select Application…