对不起我的英语不好。
我想显示以字符分隔的单词。我在包含单个字符的“chars”数组中有不同的字符串。我试过这个:
int x = 20;
int y = 20;
int screenx = self.view.bounds.size.width - 14;
for (NSString *string in chars){
for (int i=0; i<messageLength; i++) {
UILabel *display;
display.text = [chars objectAtIndex:i];
display.frame = CGRectMake(x, y, 14, 22);
display.textColor = [UIColor whiteColor];
x = x + 14;
if (x >= screenx){
x = 20;
y = y + 20;
}
}
}