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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:23:11+00:00 2026-06-04T15:23:11+00:00

I want more than one font color in the same UILabel. I dont know

  • 0

I want more than one font color in the same UILabel. I dont know if it is possible. I dont really think so but maybe some of you out there have a smart solution for it? Maybe something like stringWithFormat. [NSString stringWithFormatAndColor: @"Text with color: %@ %@", text, color, text, color]

This image illustrate what I’m trying to accomplish:

enter image description here

  • 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-04T15:23:12+00:00Added an answer on June 4, 2026 at 3:23 pm

    You can achieve this with NSAttributedSting. An easy to use drop-in replacement for UILabels with support for attributed strings is TTTAtributedLabel or OHAttributedLabel

    In my experience it is easier to work with NSMutableAttributedStrings and build it up step by step.

    NSMutableAttributedString *attrStr = [NSMutableAttributedString attributedStringWithString:@""];
    
    NSMutableAttributedString *a = [NSMutableAttributedString attributedStringWithString:@"This is "];      
    [a setTextColor:aColorObj];
    NSMutableAttributedString *b = [NSMutableAttributedString attributedStringWithString:@"only one "];     
    [b setTextColor:bColorObj];
    NSMutableAttributedString *c = [NSMutableAttributedString attributedStringWithString:@"Label"];     
    [c setTextColor:cColorObj];
    
    [attrStr appendAttributedString:a];
    [attrStr appendAttributedString:b];
    [attrStr appendAttributedString:c];
    
    
    OHAttributedLabel *attributedTextLabel = [[OHAttributedLabel] initWithFrame:frame]
    [attributedTextLabel setAttributedText:attrStr];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to pop more than one viewcontroller in UINavigationController? suppose i want
I want to pass more than one variable to other web pages. I try
I want to send more than one image file from client to server for
I just want to show more than one Watch window. There, they say that
I want to route to more than one action, I make the routing configuration
I want to display content in more than one languages in a page. For
I want to create more than one procedure in a SQL file, ie: create
In ant if want to execute more than one target, we can do it
Okay, I have this program and I don't want more than one instance of
I want to use more than one date picker in single application, I have

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.