0

I am attempting to set a UIButton Text through an array like so:

// Set User Name
NSString *user = entry[@"user"][@"full_name"];
[cell.nameLabel.titleLabel setText:user];

However no text appears on the Application when it loads. The text is being returned and it is stored in the array. Here is my customization of the Button:

// Name
self.nameLabel = [[UIButton alloc] initWithFrame:CGRectMake(58, 6, 192, 25)];
[self.nameLabel.titleLabel setFont:[UIFont fontWithName:@"Helvetica-Regular" size:12.0]];
self.nameLabel.titleLabel.textColor = [UIColor colorWithRed:(38.0/255.0) green:(120.0/255.0) blue:(172.0/255.0) alpha:1.0];
[self.contentView addSubview:self.nameLabel];
Haroldo Gondim
  • 7,725
  • 9
  • 43
  • 62
Prad
  • 469
  • 1
  • 8
  • 28

1 Answers1

1
[self.nameLabel setTitle:user forState:UIControlStateNormal];
HorseT
  • 6,592
  • 2
  • 18
  • 16