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

  • Home
  • SEARCH
  • 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 8735055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:58:03+00:00 2026-06-13T09:58:03+00:00

I created a simple Tab Bar app via the template in XCode 4.5.1 which

  • 0

I created a simple Tab Bar app via the template in XCode 4.5.1 which gave me two view controllers like this in the app_delegate:

self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = @[viewController1, viewController2];
self.window.rootViewController = self.tabBarController;

In viewController1, I have an instance method that writes out some login / logout buttons. One of the callbacks is in app_delegate and would like to call the instance method in viewController1. I tried this:

[[self.tabBarController.viewControllers objectAtIndex:0 ] renderButton];

but it’s not working. Is this type of query possible or should I use some other technique?

thx in advance

  • 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-13T09:58:04+00:00Added an answer on June 13, 2026 at 9:58 am

    What you’ve written should work. A cast isn’t necessary (though it does make the code more readable). If you are certain renderButton isn’t being called (put a breakpoint or NSLog message in this method), my guess is that you forgot to declare it in the FirstViewController’s header file.

    @interface FirstViewController : UIViewController
    -(void)renderButton;
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Xcode 4 and I created an application using the Tab Bar template
My iPhone app is a Tab Bar Application, which has 5 tabs. In each
I have created a new project from the template: IPhoneOS>Application>Tab Bar Application. I get
I have created a Split view.Now I want to add Tab bar in my
I have tab controller created through storyboards with a custom implementation (simple buttons and
I'm trying to create a simple profile tab which includes a gravatar using Devise,
Hello I`ve created simple WFC DataService and connected entit model with my database. This
Could someone help me on this, I have created simple web services using axis2
I have a very simple code where I use Action Bar with tab fragments.
I'm a relative newbie on iPhone app development but have successfully created a tab

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.