UILabel subclass that renders see through text using CoreText, textColor is clearColor.
UILabelsubclass that creates a label with see-through text.
Want a pod for this, just add following line to your podfile-
You may wish to copy the source files directly, totally up to you.
Using ClearTextLabel is as simple as using regular UILabel :
objective-c ClearTextLabel* objCTLbl = [[ClearTextLabel alloc] initWithFrame:CGRectMake(20, 100, 280, 368)]; objCTLbl.text = @"Can this be drawn with transparency ?"; [self.view addSubview:objCTLbl];
ClearTextLabel draws the text provided to it with transparency. * It uses CoreGraphics Context to draw the letters' CGPath. * Letters' CGPath, how ? Well what's CoreText there for ?
Demo app includes the most basic regular example just for reference.