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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:26:17+00:00 2026-05-26T01:26:17+00:00

I have a ViewController in Interface Builder that has a TableViewController embedded in it

  • 0

I have a ViewController in Interface Builder that has a TableViewController embedded in it (I reuse the functionality of the TableViewController elsewhere). I need to set a delegate in the TabelViewController back to the UIViewController it is embedded in so that I can use the NavigationController of the UIViewController (click on row in embedded TableViewController, new ViewController appears….).

I’ve got a delegate to make this all work, the only problem I have is where to set the delegate. I had read that awakeFromNib gets called once a nib is read in and all IBOutlets have been set (the embedded TableViewController is an IBOutlet). I can step through the code and see that this function is called when the app first launches. However, when I later call the delegate (when a row is clicked), the delegate is null. If I set the delegate in viewDidLoad, everything works great.

Any ideas why awakeFromNib isn’t working? Should I be doing this in viewDidLoad anyway?

Thanks!

  • 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-26T01:26:17+00:00Added an answer on May 26, 2026 at 1:26 am

    You can read more about why your awakeFromNib method is not working properly here: Why won't my awakeFromNib fire?

    The viewDidLoad method is a perfect place for setting the UITableViewDelegate no actual benefits from setting it in other methods.

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

Sidebar

Related Questions

I have a UITextField that has been added to my view in Interface Builder.
I have an MKMapView whose delegate is set in Interface Builder and which is
I have a ViewController that has its own NIB. I would like to embed
I have a viewController (Planner) that loads two view controllers (InfoEditor and MonthlyPlan) when
I have a viewController that autorotates just fine, The problem is that is I
I have a UITabBarController that adds a viewController, but the positioning is off. There
I have just noticed that my ViewController does not call init (See below) when
I have a ViewController that manages a view full of controls, including UITextView s,
I have a custom view that subclasses UIView. It has a touchesEnded event, however
Let's say I have a ViewController that needs access to a view. In the

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.