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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:05:42+00:00 2026-06-14T22:05:42+00:00

I’m relatively new to Xcode. I am trying to do this in Xcode’s Interface

  • 0

I’m relatively new to Xcode.

I am trying to do this in Xcode’s Interface Builder as much as possible. Because I am working with legacy code, Storyboards are not an option.

I’m working with a XIB I’ll call DualTVController. It is based on a simple UIViewContoller.

In this XIB I have two UITableViews, the LeftTV and the RightTV. In IB, I am able to assign the delegate/datasource of the LeftTV to the File’s Owner, which is the class representation of the XIB. This works fine.

I want to assign the delegate/datasource of the RightTV in IB. So far, I’ve successfully been able to use the LeftTV for this, but that’s just confusing.

Instead, I have created a UITableViewController subclass called RightDelegate, and assigned it as the class of a simple Object I create through the IB. I made it follow the UITableViewDataSource and UITableViewDelegate protocols. This allows me to hook up the delegate/datasource of RightTV to it in IB, but when I try to run it, I get a BAD_ACCESS error.

I have the same delegate code in RightDelegate as I do in LeftTV (which works). Can anyone suggest the problem? Am I responsible for instantiating RightDelegate in code?

Thanks for any help.

  • 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-14T22:05:42+00:00Added an answer on June 14, 2026 at 10:05 pm

    note: I know you want to do this in IB, but in this case this is probably best handled in code. setting delegates for a single tableview in IB is simple, but eaisly overlooked. Since the delegates are so important, I usually keep them in code so there less mistakes.

    when you are going to use more than one tableview there are a couple of ways to manage the delegates.

    a) manage both delegates in your view controller with logic on each delegate callback to determine which tableview is asking (ends up messy)
    b) split delegates by leaving one in your vc and putting the other in its own separate controller (somewhat confusing)

    c) split delegates by using a separate tableview controller instance for each tableview. This is probably the best choice but it does require 3 controllers – your initial view controller that will init the xib file and then two separate tableview controllers – leftTable, rightTable.

    in your main view controller, make sure you setup a property for each tableview:
    then include your view controllers
    then initialize the tableview controllers and set the delegates

    //Example
    self.rtv = [[rightTableViewController alloc] init];  //create a strong property for this
    self.rtv.delegate = self;  //let it talk back to you if needed
    
    self.ltv = [[leftTableViewController alloc] init];
    self.ltv.delegate = self; 
    
    self.rightTableView.delegate = rtv;
    self.rightTableView.datasource = rtv;
    
    self.leftTableView.delegate = ltv;
    self.leftTableView.datasource = ltv;
    

    Then just add code in each tableview controller to manage the tableviews.
    If you need the tableview controller to call your main view controller then use delegate callbacks.

    hope this helps, best of luck.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,

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.