Then the line you have in your code is not the same as the one you provided. It's always a good idea to paste the actual code in order to reduce confusion.line has no errors.
By default, for a non-customized table cell, I believe the textLabel is shown in bold.cars are shown in UITableView
i need to put in bold
So how I can make out cars from ball?
It's always best to design your tableview data model so it contains the info needed for display so that there's a minimum of special-case code. Obviously a simple list of strings isn't enough to describe your data. You need a data object for each row. And in that data object you can put a font or you can put a flag that indicates bold/not bold. Then in your cellForRowAtIndexPath you check that value and make the label bold or not bold.
As a start I'd use an array of dictionaries. For each row dictionary I'd add the title and a boolean flag that indicates bold/not bold.
Not sure what you mean by "make out". Please elaborate.
make out
Wikipedia definition for make out. I seriously don't think this is what you mean...
Perhaps you mean emphasise?
Can you ut me q example??
// viewDidLoad
// build the data model
NSMutableArray* rowArray = ;
self.rowArray = rowArray;
NSDictionary* rowDictionary = [NSDictionary dictionaryWithObjectsAndKeys: @"cars", kTitleKey, [NSNumber numberWithBool:YES], kBoldFontKey, nil];
[rowArray addObject:rowDictionary];
rowDictionary = [NSDictionary dictionaryWithObjectsAndKeys: @"balls", kTitleKey, [NSNumber numberWithBool:NO], kBoldFontKey, nil];
[rowArray addObject:rowDictionary];
// cellForRowAtIndexPath
// display the model object for this row
NSDictionary* rowDictionary = [self.rowArray objectAtIndex:row];
cell.titleLabel.text = [rowDictionary objectForKey:kTitleKey];
if ([[rowDictionary objectForKey:kBoldFontKey] boolValue])
cell.titleLabel.font = some bold font;
else
cell.titleLabel.font = some non-bold font;
Not quite sure what the translation of that is into English but I'll give you some psuedo code.
Code:// viewDidLoad // build the data model NSMutableArray* rowArray = ; self.rowArray = rowArray; NSDictionary* rowDictionary = [NSDictionary dictionaryWithObjectsAndKeys: @"cars", kTitleKey, [NSNumber numberWithBool:YES], kBoldFontKey, nil]; [rowArray addObject:rowDictionary]; rowDictionary = [NSDictionary dictionaryWithObjectsAndKeys: @"balls", kTitleKey, [NSNumber numberWithBool:NO], kBoldFontKey, nil]; [rowArray addObject:rowDictionary]; // cellForRowAtIndexPath // display the model object for this row NSDictionary* rowDictionary = [self.rowArray objectAtIndex:row]; cell.titleLabel.text = [rowDictionary objectForKey:kTitleKey]; if ([[rowDictionary objectForKey:kBoldFontKey] boolValue]) cell.titleLabel.font = some bold font; else cell.titleLabel.font = some non-bold font;