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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:10:20+00:00 2026-06-09T12:10:20+00:00

I am new to IOS, Xcode and MVC. I am on a steep learning

  • 0

I am new to IOS, Xcode and MVC. I am on a steep learning curve and am failing with what I assume is a most basic task.

I have a tabbed application with two tabs. Both tab views communicate with a web service and I want to add an image to each tab view, changing the image to indicate the connection state.

So, I created a third .xib file with a controller class (IconViewController). I am hoping to add and remove an instance of this icon view in each of the tab views.

Here is the pseudo code for my icon view:

@interface IconViewController : UIViewController
{
    UIImageView *_icon;
}

@property (nonatomic) IBOutlet UIImageView *icon;

- (void)setForBusy;
- (void)setForOk;
- (void)setForFail;

And implementation:

@implementation IconViewController

@synthesize icon = _icon;

-(void)setForBusy
{
    // Set Busy Icon Image
}

-(void)setForOk
{
    // Set Ok Icon Image
}

-(void)setForFail
{
    // Set Fail Icon Image
}

The icon IBOutlet is connected to an UIImageView on the accompanying xib file.

Here is one of the root tab controllers:

#import "IconViewController.h"

@interface TaboneViewController : UIViewController
{
    IconViewController *_iconViewController;
}
@property (nonatomic) IBOutlet IconViewController *iconViewController;

and implementation:

@synthesize iconViewController = _iconViewController;

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.iconViewController = [[IconViewController alloc]
                            initWithNibName:@"iconViewController"
                            bundle:nil];
    [self.view addSubview:self.iconViewController.view];
}

In the tabView xib Interface Builder I added an Object and made it a class type IconViewController. I connected the Icon View Controller Object->Reference Outlet to the File Owner->iconViewController Outlet.

Running the project I get the error:
loaded the “iconViewController” nib but the view outlet was not set.

I have experimented with other connections but with no luck. It seems to me that my first connection should work but it doesn’t.

Any idea what I am misunderstanding? Is the principle good (loading an instance of third view into two root views)? If so, what outlet needs connecting?

Many thanks, Polly

  • 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-09T12:10:21+00:00Added an answer on June 9, 2026 at 12:10 pm

    I see your issue. You want to have common stage of image for both tab. I think it is better to implement subclass of UIView (or UIImageView) and implement all methods like set (void)setForBusy and etc. The stage of image you should receive from parent ViewController, something like UINavigationView controller (if you have it). Otherwise you should save stage somewhere else. My personal opinion it is too expensive to create new controller just for your purpose.

    Hope it helps.

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

Sidebar

Related Questions

I started a new IOS app project in Xcode 4.3.1. I selected tabbed application
I created a new Xcode project (iOS application, Tabbed Application). Now I'm seeing one
I am completely new to Xcode and iOS developing in general. Basically I have
I'm new to iOS & Xcode development. I have created a new story board
I'm fairly new to iOS programming, but have a basic understanding of it. I
I have an application that was originally created compatible with iOS 2.x. With Xcode
Possible Duplicate: Cannot find window-based application on XCode I am pretty new to IOS
I am new to iOS, i am using Xcode 4.3.2, and i have created
So I am very new to xcode and iOS and just getting use to
I'm new to Xcode and programming for iOS, so I might not get what

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.