objective-cuilabeladdsubview

UILabel with subview


For some reasons I have to have a UILabel with a custom background view which I wanted to achieve by [label addSubview:backgroundView].

The background renders fine, but the Labels text does not appear.

What I can't do is using the background color with a pattern image.


Solution

  • As I've read some more posts I had to re-consider and in the end use a subclasses UIView. Not preferable as said in my post and comment, but finally working.