नहीं बदल रहा है, जब मैं तालिकादृश्य पॉप्युलेट किया गया है, तो निम्न कोड का उपयोग करके UITableViewCell
के फ़ॉन्ट को कस्टमाइज़ करने का प्रयास कर रहा हूं।UITableViewCell फ़ॉन्ट
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"MyIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier];
}
// Set up the cell
int storyIndex = [indexPath indexAtPosition: [indexPath length] - 1];
NSString *temp = [[NSString alloc] initWithString:[[stories objectAtIndex: storyIndex] objectForKey: @"title"]];
cell.textLabel.text = temp;
[[cell textLabel] setTextColor:[UIColor colorWithRed:154.0/255.0 green:14.0/255.0 blue:2.0/255.0 alpha:1]];
[[cell textLabel] setFont:[UIFont systemFontOfSize:12.0]];
return cell;
}
मुझे के जीवन मैं नहीं जानता कि क्यों यह फॉन्ट नहीं बदलेगा के लिए! इसके अलावा उपर्युक्त कोड ठीक काम करता है यदि सेल कोड में cell.textLabel.text = @"TEST";
कोई सुझाव है तो मैं कड़ी मेहनत करता हूं? धन्यवाद!
आप तरीकों जहां मैं इसे बदलना चाहिए पर विस्तृत कृपया सकते में इन संशोधनों को करना है? धन्यवाद! –
कभी नहीं, बस इसे मिला। –