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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:56:37+00:00 2026-05-17T06:56:37+00:00

i have this MainViewController, which is a controller for my table view. Whenever I

  • 0

i have this MainViewController, which is a controller for my table view. Whenever I press a row on the table view i go to my employeeViewController.
Which is a normal view with a Text View inside of it.

So my hierarchy looks like this:

-Window

–Navigation Controller

—Navigation Bar

—Main View Controller

—-Table View

—-Navigation Item

And whenever i press a row in the list, based on the value of a given key, i get a view opened called employeeViewController.xib.
His viewController is called the same, employeeViewController.h (as specified in the File’s Owner object.)

So, i’ve added the following items to the view, with the following hierarchy:

-View

–Text View

I’ve linked the Text View’s delegate and referencing outlets to the file’s owner. And the files owner is also linked to the View, for the ‘view’ referencing outlet.

So when i try the following in my employeeViewController.m my TextView does not respond:

- (id)initWithNibAndEmployeeName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil employeeName:(NSString *)employeeName {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        name = employeeName;
        textView.text = name;
    }
    return self;
}

And this is my employeeViewController.h:

@interface employeeViewController : UIViewController <UITextViewDelegate> {
    NSString *name;
    IBOutlet UITextView *textView;
}
-(id)initWithNibAndEmployeeName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil employeeName:(NSString *)employeeName;
@end

Why can’t i do anything with my TextView using this set up?

Thanks in advance!

  • 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-17T06:56:37+00:00Added an answer on May 17, 2026 at 6:56 am

    “Lazy loading” is the problem – anything in your view is allocated and initialized until view is about to appear, so you will be able to set value to textView only in viewWillAppear method.

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

Sidebar

Related Questions

I have a table view which is inside a navigation controller, however besides this
I have a view controller, MainViewController in which I have a UIButton as an
I have my MainViewController which a UIViewController class, in this view I have a
I have a MainViewController in my Cocoa Touch app which shows a status view
I have an UIViewController (called MainViewController ) which presents modally a semi-transparent view (
I'm currently working on an app with this structure: I have a view controller
I have a viewController called MainViewController, which has a UIButton. When tapped, this button
I have a normal UIPopoverController which is made in this way: -(IBAction)btKBIs_click:(id)sender { if(kbiPopOver
I have this form, in which i need to populate a combo box with
I have a view in my storyboard which I assigned an identifier called MainView.

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.