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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:39:11+00:00 2026-06-18T08:39:11+00:00

My view controller StartViewController is opened/added (addSubview) by one of two other view controllers

  • 0

My view controller StartViewController is opened/added (addSubview) by one of two other view controllers (RootViewController or TelnetAddressbookViewController). Im trying to figure out which of those two is the one that launched StartViewController.

NSLog(@"superview %@",self.view.superview.description);
NSLog(@"superview %@",self.superclass);

if ([self.view.superview isKindOfClass:[RootViewController class]]) {

    NSLog(@"launched by RootViewController");

}else if ([self.view.superview isKindOfClass:[TelnetAddressbookViewController class]]) {

    NSLog(@"launched TelnetAddressbookViewController");
}

[self.view removeFromSuperview];

The first NSLOG (self.view.superview.description) outputs:

superview UIView: 0x81d6710; frame = (0 0; 748 1024); transform = [0,
1, -1, 0, 0, 0]; autoresize = RM+BM; layer = >

What its referencing is what I need (0x81d6710) but its class is a UIViewController instead of my custom view controllers.

  • 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-18T08:39:13+00:00Added an answer on June 18, 2026 at 8:39 am

    I ended up setting a property, which does not answer the original question (sorry). There really should be a way though, even if I had done it by evaluating the frame of the super view.

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

Sidebar

Related Questions

I have a main view controller with two other view controllers as member variables,
In one of my view controller (using Storyboard and ARC mode), i add two
My view controller needs to know when it is popped out of the navigation
I have two View Controller classes Class A & Class B There is a
My view controller is not responding to didRotateFromInterfaceOrientation , despite that I have added
I have a view controller with a content view, where I am trying to
I have created a view controller, and added a table view as a subview
I have one view controller set with one graph view and segmented control inside
I have 4 ViewControllers , startViewController as the initial View Controller. This contains my
I've got one view controller that I want to have a top bar, and

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.