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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:50:51+00:00 2026-06-18T03:50:51+00:00

I have a simple setup using storyboard with one viewcontroller (MainViewController) speaking to another

  • 0

I have a simple setup using storyboard with one viewcontroller (MainViewController) speaking to another (JoinedViewController) via a delegate. Everything is good up until the prepareForSegue. There, I am declaring the roomData and a label’s text for the receiving viewcontroller, but neither is received.

MainViewController.m

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if ([segue.identifier isEqualToString:@"JoinRoom"]) {
        UINavigationController *navigationController = segue.destinationViewController;
        JoinedViewController *joinedViewController = [[navigationController viewControllers]objectAtIndex:0];
        joinedViewController.label.text = self.roomName;
        joinedViewController.roomData = self.roomData;
        joinedViewController.delegate = self;
    }
}

MainViewController.h delcarations:

@interface MainViewController : UIViewController <JoinedViewControllerDelegate, UITextFieldDelegate>

@property (weak, nonatomic) IBOutlet UITextField *textField;
@property (nonatomic, copy) NSString *roomName;
@property (nonatomic, weak) S3ListObjectsResult *roomData;

JoinedViewController.h declarations:

@interface JoinedViewController : UITableViewController 

@property (nonatomic, weak) id <JoinedViewControllerDelegate> delegate;
@property (nonatomic, weak) S3ListObjectsResult *roomData;
@property (weak, nonatomic) IBOutlet UILabel *label;
  • 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-18T03:50:52+00:00Added an answer on June 18, 2026 at 3:50 am

    I think you have two different problems. roomData should be declared strong, not weak (in both classes). The problem with roomName, isn’t the string itself, but the fact that you’re trying to set it on the label before JoinedViewController’s viewDidLoad has even been called. You can’t access another controller’s UI elements until its view has been loaded. You should pass the string, roomData instead, and set it on the label in JoinedViewController’s viewDidAppear method.

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

Sidebar

Related Questions

I have a setup where I'm serving simple python pages using the mod_python publisher.
I have a simple messaging queue setup and running using the Zend_Queue object heirarchy.
I have a simple gallery style link setup using image swap on hover that
I have a very simple slideshow setup on my homepage with fading images using
I have a very simple setup, a whole solution that builds using .NET 3.5.
I have a simple pub-sub setup on a mid-sized network, using ZMQ 2.1. Although
We have setup a simple form using Web Forms For Marketers on our Sitecore
I have a simple PartialView setup in my MVC3 Project using the Razor View
I have a rather simple setup here using the new ASP.Net 4.5 in a
I thought it would be simple to setup:I have 2 threads,each one contains completely

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.