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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:42:38+00:00 2026-05-26T01:42:38+00:00

I have this ad class which contains an UIImageView. I’ve added an instance of

  • 0

I have this ad class which contains an UIImageView. I’ve added an instance of the class to my appdelegate onto the “window” view.

Now, I want to, when the user taps the ad, push my “detailedViewController” onto the current navigation controller, which all of my tab bar items contain. I don’t know if it is possible.

Perhaps, I should just add my advertisement class to every view controller for every nav controller. However, if the user pushes or changes a view controller it would reset the class.

I just want to overlay the ad once.

EDIT:

Let me rephrase, can I from the app delegate and from my object know which tab bar item is selected? If I can determine which tab bar item is selected I can point to the appropriate nav controller instance.

  • 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-26T01:42:39+00:00Added an answer on May 26, 2026 at 1:42 am

    The easyiest way would be to present your DetailVC as a ModalView which also makes sense in semantics.

    Yes, it is possible to detect which tab is selected but it is easier to use the selectedViewController-property of UITabBarController.

    UIViewController *curVC = myTabBarController.selectedViewController;
    if([curVC isKindOfClass:UINavigationController.class])
    {
        UINavigationController *nav = (UINavigationController*)curVC;
        [nav push...];
    }
    else
    {
        // do sth else: go to webpage for instance
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a base class which contains an abstract/MustInherit method. I want this method
I have a class which contains a list of items. I want to serialize
I have a custom model class which contains a decimal member and a view
In C++, I have a class which contains an anonymous bitfield struct. I want
I have a class Person which contains String firstName, lastName . I want to
I have a library class which contains two methods, say, Login() and NavigateToPage(). Now,
I have an class which should send/receive data in packet form. This class contains
This a continuation of this question. I have an Address class which contains basic
I have a class which contains this method /** * Uses the native RegExp
I have a class which looks something like this: public class Test { private

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.