如何在动态图像上放置文字或标签。因此,如果移动或动画图像,图像上的文本也应该移动。请帮忙
答案 0 :(得分:1)
您可以将标签添加为UIImageView的子视图吗?
UIImageView *imageV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"car.png"]];
[imageV setFrame:CGRectMake(0, 0, 100, 100)];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 40, 10)];
label.text = @"Test";
[imageV addSubview:label];
只是一个例子......