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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:21:29+00:00 2026-05-26T18:21:29+00:00

I need help figuring out how to create a cell like the one representing

  • 0

I need help figuring out how to create a cell like the one representing an Address in the iphone Contacts app. I’m not looking to create an address. I just need to know how to show the following in edit mode:

  1. Text on the left (like UITableViewCellStyleValue2)
  2. Gray line separating the left and the right
  3. Content on the right hand in a custom format–I will have varying formats depending on what I’m trying to present here, with differing heights.

Any sample code, Apple examples (though I can’t find one), tutorials, or general guidances is greatly appreciated. I’m trying to avoid having to create a custom container class to handle everything on the left and dynamically resize based on the content I want to put on the right. Surely someone has done this already, right? 🙂

The edit mode looks like this: Contacts Address Edit

  • 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-26T18:21:30+00:00Added an answer on May 26, 2026 at 6:21 pm

    You have to create your own UITableVIewCellSubclass, this is not as difficult as you might think.

    Basically you just have to add 2 UITextField and a UIImageView in between for the separator.

    I advise you to have a look at Apple’s TableView Programming guide, and especially A Closer Look at Table-View Cells

    You have a code sample very similar to what you are trying to achieve. Here is the idea (untested code) :

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
        static NSString *CellIdentifier = @"ImageOnRightCell";
    
        UITextField*main, *second;
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (cell == nil) {
            cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
            cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
    
            main = [[[UITextField alloc] initWithFrame:CGRectMake(0.0, 0.0, 220.0, 15.0)] autorelease];
            main.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleHeight;
            [cell.contentView addSubview:main];
    
            second = [[[UITextField alloc] initWithFrame:CGRectMake(220.0, 0.0, 220.0, 15.0)] autorelease];
            second.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleHeight;
            [cell.contentView addSubview:second];
    
        }
    
        return cell;
    }
    

    Hope this helps,
    Vincent

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

Sidebar

Related Questions

I need help on figuring out how to create a repository on github to
I need some help figuring this out. I am trying to create a function
I need help figuring this out, what am I doing wrong my book doesn't
I need help figuring out how to change out the view in my application.
I need help with figuring out how to get hold of the redirect after
I need some help figuring out what I'm doing wrong here. I am trying
I need a little help figuring this out because I'm new to stored procedures.
I need help figuring out some regular expressions. I'm running the dig command and
I'm looking to implement the Shunting-yard Algorithm , but I need some help figuring
I need some help figuring out the best way to proceed with creating a

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.