Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6075085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:27:17+00:00 2026-05-23T10:27:17+00:00

i am new to iphone development and i am going through tutorial and some

  • 0

i am new to iphone development and i am going through tutorial and some sample.

i want to know what is the difference between NSObject and UIViewController class and how we will come to know which class we should use.

some are written in NSObject and some are in UIViewController.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:27:17+00:00Added an answer on May 23, 2026 at 10:27 am

    From Wikipedia, a basic overview of object-oriented programming:

    Object-oriented programming (OOP) is a
    programming paradigm using “objects” –
    data structures consisting of data
    fields and methods together with their
    interactions – to design applications
    and computer programs. […] An object-oriented program will usually contain different types of objects, each type corresponding to a particular kind of complex data to be managed or perhaps to a real-world object or concept such as a bank account, a hockey player, or a bulldozer.

    In Objective-C, all Objects are based upon NSObject. Just take this at face value for now. If you want to use an Object, it’s going to be based on NSObject. So, unless you’re using an int or a float, you’re likely using something that’s based on NSObject.

    NSObject in-and-of-itself, doesn’t really supply any functionality. It’s your ‘starting place’ or ‘blank slate’ for an Object.

    You might build an Object definition which is used to represent an Animal, like this:

    @interface Animal : NSObject { }
    
    @property (assign) int age;
    
    - (Animal*)mateWith:(Animal*)lover;
    
    @end
    

    In this example we’ve described a basic Animal. This class basically does two things; knows the age of the Animal, and can mate with another animal to produce an Animal offspring.

    You’ll notice in that example that we based our Object definition on NSObject.

    Now, say we want to create a definition for a Human; well, a Human is, and always will be, a subset of all Animals. So, we can re-use all of the logic in the Animal class definition to create a Human definition – and we might do so like this:

    @interface Human : Animal { }
    
    - (void)lie;
    
    @end
    

    In this example, we’ve created a new definition for a type of Object called “Human”. We only defined one thing: a method which gives our class the ability to lie – except we’ll also get the ability to mate because we’re based on “Animal”, and “Animal” already describes how to mate.

    Getting to your question:

    UIViewController contains a BUNCH of logic for doing some very complex tasks. Most of that logic is part of the Cocoa Touch framework.

    If you’re making an “Animal” class, you don’t need to know how to respond to user input from the screen, you don’t need to know how to manage a UIView, you don’t need to keep track of parentViewControllers, etc. So, basing our Animal class on UIViewController would be silly. This is when NOT to use UIViewController.

    Now, if you’ve making a user interface screen on the iPhone, and you want to perform some routine when the user clicks on a button – then you DO need all of the UIViewController stuff, so you’d subclass that.

    I can understand why, if you’re not coming from an Object Oriented Programming background, you might be confused about this. It seems like most of the things you’d need to create ARE UIViewController subclasses. However, as you explore the world of OOP, you’ll discover that not only are Objects something someone else wrote that you can use – but they are things you’ll want to create from the ground up to accomplish things you used to do procedurally.

    Best of luck on your exciting journey.

    I’d highly recommend you take a trip to your local Barnes and Noble or head over to Amazon.com and pick up some books on the topic – if you have a friend who already knows OOP a good mentor is much faster than learning yourself.

    Don’t forget, on the iPhone, you’ll have to deal with memory management as well. This is a sticking point for a lot of people – and causes a lot of headaches if you don’t follow the rules. Learn them early and you’ll be served well.

    Hope that helped,
    Cheers.

    Sources:

    • http://en.wikipedia.org/wiki/Object-oriented_programming
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to iPhone development, and I want to know how can I
I am new to iphone development. I just want to know that is it
I am new to iphone development.I want to add RegexKitLite framework.I have downloaded the
New to iPhone development and working through exercises and examples to get me up
New to iPhone development, not new to software development in general. I want my
I'm new in iPhone development, and I want to make a custom Reel/Spinner like
Im new to iphone development. here in my application i added pickerview for some
Im new to iphone development.here i added some list of names in pickerview.the action
Im new to iphone development. here i want to view the screen like landscape
I am new to iphone development. I want to add the google search to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.