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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:52:38+00:00 2026-05-16T00:52:38+00:00

I have added a UITableView in IB and set the delegate and datasource and

  • 0

I have added a UITableView in IB and set the “delegate” and “datasource” and all is working well. What I wanted to do next was change the separator color, but the only way I could find to do this was to add the method to one of the delegate callbacks, is there a better place I should put this?

I don’t have this at the moment but I was thinking that maybe I need to add an “iVar” from my controller that I can link to the UITableView in IB and then set separator color in the viewDidload?

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView setSeparatorColor:[UIColor blackColor]];
    return 65;
}
  • 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-16T00:52:38+00:00Added an answer on May 16, 2026 at 12:52 am
    - (void)viewDidLoad
    {
       [self.tableView setSeparatorColor:[UIColor myColor]];
    }
    

    You’ll need the self. to access it, remember.

    Swift 4.2

    tableView.separatorColor = UIColor.red
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have added some data in UITableView, and I want to change the color
I have UITextField in each Cell of UITableview and I have added UIPickerview as
I have a UIView that gets added to my UITableView .view as a subview.
I have added a plugin called scrollpaper to a site I'm working on. The
I have added a checker to ensure that all fields in a form have
A quick question, I am setting a delegate for UITableView and I have a
I have a UITableView with a gesture recognizer added: UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc]
This question is related to UITableView issue when using separate delegate/dataSource , though I
I have added a subview over my UITableView using: TransparentViewController *tvc = [[TransparentViewController alloc]
I have set up a UITableView which has 3 sections in, with 3 rows

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.