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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:09:02+00:00 2026-06-10T12:09:02+00:00

This is my first question and I am very new in programming field. I

  • 0

This is my first question and I am very new in programming field. I have a tab bar controller and I want to transfer data from FVC(1st view controller) to SVC(second View Controller). In FVC ,I am taking controllers contained in tab bar controller in an array (VCArray) and assigning the second object of that array to instance of SVC and setting properties of SVC with appropriate data of FVC but those properties appears nil in SVC.

and 1 more interesting thing is that when I check the SVC instance which was assigned as 2nd object of the VCArray with [isOFKindClass SVC] and [isOFKindClass FVC] both come true..How is it possible? An object can have two classes? and if I check [isOfKIndClass NSArray] it comes false..it means theres nothing wrong in implementation.

Sorry about my bad english..:p

  • 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-06-10T12:09:03+00:00Added an answer on June 10, 2026 at 12:09 pm

    The answer to part1 is that you need to expose properties on SVC, so that another class can access them, and the FVC needs to import the interface file (the .h) of svc. Thus you almost always need two things to do this: a way to find the class you want to make changes to, and the interface of that class. The property will look like this:

    SVC.h:
    @property (nonatomic, strong) NSString *title;
    - (void)doSomething;
    
    FVC:
    #import "SVC.h"
    
    SVC *svc = ...; // get a reference to it
    svc.title = @"Howdie!";
    [svc doSomething]; // tell the class to use the title you just set, for example
    

    To answer your second question, there are two types of these “is..” methods, isKindOfClass and isMemberOfClass. The first says is the current object a type of the provided class, or ANY superclass. The second only passes if the class is in fact an exact member. For example:

    NSMutableData *data;
    [data isKindOfClass:[NSData class]] == YES
    [data isKindOfClass:[NSMutableData class]] == YES
    
    [data isMemeberOfClass:[NSData class]] == NO
    [data isMemeberOfClass:[NSMutableData class]] == YES
    

    EDIT: So the data never makes it into SVC. Well try this – a property is just a shortcut to have an ivar, a getter, (and usually) a setter. You can actually provide your own setter. So you say that (using my example above), that in SVC title is always nil, even though its set by SVC. There are only three reasons this can happen:

    • FVC has a reference to another object, but in fact you called it SVC so when the value is set, its set to another class not SVC

    • SVC was a nil object when FVC set the value (ObjectiveC handles messages to nil just fine, so you will not see any errors on the console)

    • SVC has reset the value to nil unbeknownst to you in say viewWillAppear

    So the way you can find this out is override the variable setter (again using my example):

    - (void)setTitle:(NSString *)val
    {
      title = val; // ARC way
      NSLog(@"SVC - just set title to %@", title);
    }
    

    Add this to SVC and see what happens.

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

Sidebar

Related Questions

This is very basic magento question i guess. I want to first get all
I am very new to programming, so please forgive me if this question seems
Greetings, this is my very first question and I just do programming as a
This may be a very mundane question, but this is the first jQuery plugin
This is a very basic question on Java. I've read somewhere that at first
So this was one of my very first questions here, but I have a
this is my first question I have searched for any launching activity questions and
Original Question: This is my first post ever. I'm trying to learn ios programming
First off, a lil about me, i'm very new to GUI programming, especially with
This is actually my very first question on Stackoverflow. I hope its not the

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.