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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:19:15+00:00 2026-06-13T12:19:15+00:00

iOS6 Xcode 4.5.1 Making application for iOS5 or later using storyboard I want to

  • 0
iOS6
Xcode 4.5.1
Making application for iOS5 or later
using storyboard

I want to load an URL when a tabBarItem is clicked.

At targetViewController.m

@interface targetViewController ()
@end

@implementation targetViewController
@synthesize webview;

- (void)viewDidLoad
{
    [self loadingMethod:view.webview];
    [super viewDidLoad];
}
(snip)

and target2ViewController.m is almost same as targetViewController.m

At customTabBarViewController.m

- (void)tabBar:(UITabBar*)tabBar didSelectItem:(UITabBarItem*)item {
  NSString *str;
  if(item.tag == 0) {
    webview = ((targetViewController *)self.selectedViewController).webview;
    [self myLoadingMethod:webview];
  } else if (item.tag == 1){
    webview = ((target2ViewController *)self.selectedViewController).webview;
    [self myLoadingMethod:webview];
  }
}

However this doesn’t work well.
When the tarBarItem for targetViewContoller is clicked, the target”2″ViewContoller’s webview will load.
and the tabBarItem for target”2″ViewCOntroller is clicked, targetViewContoller’s webview will load.

so How can I access to the webview which is included in the ViewController for the cliced tabBarItem?

  • 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-13T12:19:16+00:00Added an answer on June 13, 2026 at 12:19 pm

    Use UITabBarController property selectedViewController ,which will give you the selected ViewController.
    In Code you adding [self myLoadingMethod:wwebview]; which wrong and it should be [self myLoadingMethod:webview]. Please check.

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

Sidebar

Related Questions

My env, iOS6 Xcode 4.5.1 I want to change a color of UITabBarItem's title
I want to use Facebook SDK on XCode 4.5 for integration with iOS6. I
I am using Xcode 4.5.1 and testing on an iPhone5 with iOS6. I was
I am running the iOS6 SDK on my mac running Xcode 4.2 on Snow
i´ve updated Xcode to the latest version and therefore the base SDK is iOS6.
I am developing an iOS application with iOS 5, now I want to check
I updated to Xcode 4.5 and am working with iOS6--a mistake I will definitely
Just started using Xcode 4.5 and I got this error in the console: Warning:
How long after iOS 6 comes out that developers HAVE to submit using iOS6?
I noticed this while using iOS6 beta 3 When I create a new subclass

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.