我正在做一个项目,动态地在UILabel宽度和高度上制作NSString。我试过:NSString*text=[messageInfoobjectForKey:@"compiled"];writerNameLabel.numberOfLines=0;writerNameLabel.textAlignment=UITextAlignmentRight;writerNameLabel.backgroundColor=[UIColorclearColor];CGSizeconstraint=CGSizeMake(296,9999);CGSizesize=[textsizeWithFont:[