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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:27:14+00:00 2026-05-24T13:27:14+00:00

What I want to do is create a chat type looking comment-section. I have

  • 0

What I want to do is create a chat type looking comment-section.

I have started with a UITableView with custom cells. And I have put a UILabel inside it.

The requirement is that I need a different color of the userName, from the actual comment text.

Now if I use 2 different labels, to ensure the textColor difference, then the comment text gets indented, as its label starts after the userName label finishes.
I want the comment text to start from the starting of the cell when it goes into 2nd line, like it is in most chat apps.

And ideas how to go around it?

  • 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-24T13:27:14+00:00Added an answer on May 24, 2026 at 1:27 pm

    If I am understanding it correctly, what you can do is use 2 labels, 1 top of another. UserName label being on top of the bigger commentText label.

    The actual text of the commentText label will be the commentText appended to the text of userName label.

    What that will do is, the userName label will exactly cover the area of the commentText label where the userName is there. And the userName will look like having a different color from the commentText.

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

Sidebar

Related Questions

I want to create SOCKET chat(server + clients) with private messaging. When client write
i want create image animation , i have 50 images with png format now
I want to create my site and in the page have it so that
I'm building a custom web chat application, and while I have the basics worked
I have a chat CouchDB which stores records with following format. type:chat, email:p@g.com, friendEmail:m@g.com,
I want create something that looks like the MSN Messenger chat forms. I am
First, I am using .net 3.5. I want to create an online chat system
hi I'm trying create chat using node.js I see example in http://chat.nodejs.org/ I have
I want to to create a simple client/server chat application. The idea is that
I want to create a chat and graph on the basis of give input

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.