以下の効果を達成するには?どのように背景を達成するには画像のようにUILabelで?
UIImage
の幅がUILabel
の幅より小さいとき、私の画像は以下のように1回だけ表示されます。
私は既にUILabel
とUIImage
でもう少し作業をしました。私の以前の質問:How to stretch Image to fill the Label Width set in Background in UILabel?を参照してください。
しかし、今、私はUILabel
でいくつかのより多くの楽しみをしたい...:D
EDIT:
SBLabel *lbl = [[SBLabel alloc] initWithFrame:CGRectMake(0, 50, 320, 28)];
lbl.text = @"Hello World!!!...";
UIImage *img = [UIImage imageNamed:@"cn3.png"];
UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 50, 320, 28)];
imgView.image = img;
[lbl setNonRepeatingBackgroundImage:imgView];
[self.view addSubview:lbl];
[imgView release];
私はイメージを別のコントロールとしてではなくラベルの背景としたいと思っています... – DShah