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 6961589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:32:58+00:00 2026-05-27T15:32:58+00:00

Im really new to iOS Programming. Although I read lots of books and material

  • 0

Im really new to iOS Programming. Although I read lots of books and material I cant really find out an answer to a simple question.

I know C++ language, and I understand how variables are handled through the functions. What I really dont understand in iOS programming is how this thing is done.

For example, in C++ I create a class instance in the main function. When I call another function and I want to share this class instance all you need to do is:

myFunction(&myClassInstance);

When I switch views in iOS programming (and therefore classes) I dont know how to send a class instance that was created before. For example, if I am on the firstView of my program, and I switch to the secondView, how can I send the variables that I was currently using?

If I need to create an instance of a class that is going to be used though ALL the program, where I should create it? In C++ I would create it in the main function, in iOS Programming, where should I create it?

Thanks!

  • 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-27T15:32:59+00:00Added an answer on May 27, 2026 at 3:32 pm

    First of all what I understand from your question is
    “In C++ when we have to pass instance of some other class we use reference argument. What is option in Objective C?”

    So, Objective C is build up on C. So you can pass instance using pointer. like…

    -(void)myFunction:(MyClass*)myClassInstance;
    

    Other question is
    “If I need some instance in all the program then where should I create?”

    You can use AppDelegate class to hold that instance. Because instance of AppDelegate it accessible from all your program.
    And you can create instance in “didFinishLaunchingWithOption”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to objective-C programming for iOS. I'm struggling with a really simple task,
I'm really new to iOS development and I'm trying to create a simple table
I'm really to new to iOS development. I've read through a couple of beginners
I am fairly new to Objective-C and iOS programming, and I am having lots
Sorry if this is a really silly question but I'm new to iOS. I'm
I'm new to programming and had a question. As newer API comes out, like
I was studying Storyboard on the new iOS 5.0. It seems really simple to
i am new to iOS programming. i really need your help. i have a
im really new to linq-to-SQL so this may sound like a really dumb question,
I am really new to the programming but I am studying it. I have

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.