Is there a way where i could add a UILabel
on top of a UIImageView
programmatically ?
So finally there should be a label displayed on top of a Image.
UIImageView is a subclass of UIView so you can add any UI object onto it.
UILabel *xlabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 50, 20)];
xlabel.text = @"xxx";
[myImageView addSubview:xLabel];
As simple as
[imageView addSubview:yourLabel];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With