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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:40:04+00:00 2026-05-23T12:40:04+00:00

So heres my issue. I assume its a simple one but i just cannot

  • 0

So heres my issue. I assume its a simple one but i just cannot figure out why this is not working.

I need to access Outlets (UITextField, UITableView, UIActivityIndicatorView, etc.) in one class (RootViewController) from a different class (ServiceController).

I have this currently (only showing whats need) :

RootViewController.h

@interface RootViewController : UIViewController{
    UITextField *textField;
}

@property (nonatomic, retain) IBOutlet UITextField *textField;

- (void)startService;

@end

RootViewController.m

@implementation RootViewController

@synthesize textField;

- (void)startService{
    ServiceController *service = [[ServiceController alloc] init];
    [service start];
    [service release];
}

@end

ServiceController.h

@class RootViewController;

@interface ServiceController : NSObject{
}

@property (nonatomic, retain) IBOutlet RootViewController *rootViewController;

- (void)start;

@end

ServiceController.m

#import "RootViewController.h"

@implementation ServiceController

@synthesize rootViewController;

- (void)start{
    [((RootViewController*)rootViewController).textField setText:@"HELLO !"];
    NSLog(@"CALLED !");
}

@end

I do not see why this is not working, i use the same method to do the same thing from the RootViewController to the DetailViewController and it works fine. I checked to see if there were any other declaration in the detail/root controllers to allow that to work but i did not notice any.

PS: everything is being called successfully and “CALLED !” is being logged, just whatever i do to the outlet(s) has no effect.

  • 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-23T12:40:04+00:00Added an answer on May 23, 2026 at 12:40 pm

    Your ServiceController needs to have its rootViewController property set. You can either do this in an XIB file or explicitly in code:

    myServiceController.rootViewController = myRootViewController;

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

Sidebar

Related Questions

Here's my issue: I need to close a process, already running, from a C#
Here's my issue - I need to dynamically download several scripts using jQuery.getScript() and
My issue here is quite simple : i'm trying to use the jQuery validate
So here's my issue. I have an image that I need to shrink. The
I know this is normally rather stupid, but don't shoot me before reading the
I'm trying to figure out most of the database design and normalization before I
I'm working on some cross-platform code using OpenGL and SDL, but have immediately run
i'm having an annoying issue with django model system + its default admin. Let's
I've just been working through the erlang websockets example from Joe Armstrong's blog I'm
I am almost finished my recent project apart from one issue. I have a

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.