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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:34:28+00:00 2026-05-23T04:34:28+00:00

My setup: MainWindow with a Tab Bar Controller (including a Tab Bar) and two

  • 0

My setup: MainWindow with a Tab Bar Controller (including a Tab Bar) and two UIViewControllers, both assigned to the same interface which extends UIViewController. This custom interface implements a IBOutlet Webview and a void that loads a URL. On didSelectViewController on the main .m I try to call LoadURL.

.m of the view controller

@implementation MyTabBarController
@synthesize webView;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
return [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
}

- (void) LoadURL: (NSString*)s {
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:s]]];
}

- (void)dealloc {
[super dealloc];
}
@end

.h of the view controller

  #import <UIKit/UIKit.h>

@interface MyTabBarController : UIViewController {
IBOutlet UIWebView *webView;
}

- (void) LoadURL: (NSString*)s;

@property (nonatomic, retain) UIWebView *webView;

@end

.m of the main window

- (void) tabBarController: (UITabBarController *) myController didSelectViewController: (UIViewController *) viewController {
[myController LoadURL:@"http://google.com"]; // WARNING 
}

I put breakpoints on each of the voids and they get called. But my webView doesn’t show any content.

Other than that I got 2 warnings:

'UITabBarController' may not respond to '-LoadURL:'
Semantic Issue: Method '-LoadURL:' not found (return type defaults to 'id')
  • 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-23T04:34:29+00:00Added an answer on May 23, 2026 at 4:34 am

    Most likely you have to cast it, if you are sure it isn’t a UIViewController but a subclass of it

    [(MyTabBarController*)myController LoadURL:@"http://google.com"]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Description I have a Tab Bar Controller with a navigation controller tab. The first
I am having an issue: I have a tab-bar based app. In MainWindow.xib for
In my mainWindow.xib, I have this setup. 1) UINavigationController containing several viewControllers. 2) UIViewController
I have a tab bar setup and I want to be able to let
I have setup coredata in my appDelegate, but it first loads the mainWindow.xib and
I'm trying to load a view controller from a nib in Interface Builder. My
Coding against UIKit for iPhone. Setup, with relevant detail: SomeView.h: #import <UIKit/UIKit.h> @interface SomeView
A really simple setup - Visual Studio 2010's default new WPF project, with MainWindow
I have a WPF application with two DataGrids that share the same ItemsSource. When
Here is my app setup. TabBar App with three tab items, tabs 2 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.