0

Possible Duplicate:
UILabel text Issue in iphone

I have following text like this, Example: Offers Details: if users checkin from fb will get 20% discount and if share the this offers on twitter will get 30 % discount from businesses.

I above example I want to make 'Offers details' only bold rest of the text I want regular. How I can achieve this, I apply lot efferts to achieve this but not able to get proper solution for this. Please help me to achieve this.

Community
  • 1
  • 1
user196320
  • 97
  • 1
  • 3
  • 8
  • This actually came up on another question here - http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel – Kolors Oct 16 '12 at 12:29

1 Answers1

0

In Single label, it's not possible instead of this if you want you can do following stuff to make particular label bold.

 UILabel* myBoldlabel= [[UILabel alloc] init];
 myBoldlabel.text=@"Offer Details"; 
 myBoldlabel.font = [UIFont boldSystemFontOfSize:16.0f];
 UILabel* finalLabel=[[UILabel alloc] init];
 finalLabel.text=[NSString stringWithFormat:@"%@:,if users checkin from fb will get 20%  discount and if share the this offers on twitter will get 30 % discount from businesses",myBoldlabel];// You can place %@ anywhere in the sentence...
 finalLabel.numberOfLines=2;

If you are willing to apply any particular font, you can also add this way--:

myBoldlabel.font = [UIFont fontWithName:@"TrebuchetMS-Bold" size:18];

Hope this helps you.

Suchit
  • 81
  • 4