iOS 5 - Images within labels?
ios, ios5, objective-c
Solution
UILabel * tLable = [[UILabel alloc]init];
tLable setFrame:CGRectMake(<#CGFloat x#>, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>)];
for (int t = 0 ; t< numImages; t++) {
UIImageView * image = [UIImageView alloc]initWithFrame:CGRectMake(<#CGFloat x#>, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>)];
[image setImage:[UIImage imageNamed:<#(NSString *)#>]];
[tLable addSubview:image];
}
Problem
I'm sure there's going to be an easy answer for this, but I can't suss it out since I'm still new to iOS/Objective C. I have a tableview with some cells that I'm populating with custom labels. I know how to fill the labels with things like ``` label.font label.text etc ``` But how can I put images inside of a label? Ideally, I need to find a loop that will let me put multiple images (like star ratings - some will have 1 star, others 3, etc) in a single label. Help!