【发布时间】:2015-03-05 06:44:28
【问题描述】:
UIImageView *newView =[[UIImageView alloc]initWithFrame:CGRectMake(0.0f, 0.0f, 15.0f, 15.0f)];
[newView setImage:image];
UILabel *newLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 15.0f, 15.0f)];
newLabel.translatesAutoresizingMaskIntoConstraints = NO;
newLabel.textAlignment = NSTextAlignmentCenter;
newLabel.lineBreakMode = NSLineBreakByClipping;
newLabel.adjustsFontSizeToFitWidth = YES;
newLabel.text = labelText;
newLabel.backgroundColor = [UIColor clearColor];
[newView addSubview:newLabel];
【问题讨论】:
标签: uiimageview uilabel