ios - Trying to give UILabel a shadow, but it won't show up -
i'm trying give label in 1 of classes in app drop shadow, it's not working @ all. nothing shows up. doing wrong?
// set label properties titlelabel.font = [uifont boldsystemfontofsize:title_font_size]; titlelabel.adjustsfontsizetofitwidth = no; titlelabel.opaque = yes; titlelabel.backgroundcolor = [uicolor clearcolor]; titlelabel.textcolor = titlelabelcolor; titlelabel.shadowcolor = [uicolor blackcolor]; titlelabel.shadowoffset = cgsizemake(10, 10);
it's white, no shadow.
just add line before adding titlelabel self.view
titlelabel.layer.maskstobounds = no;
good luck !!
Comments
Post a Comment