Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to apply text shadow to UITextView?

Actually I love UILabel. They're sweet. Now I had to go to UITextView because UILabel is not aligning text vertically to the top. Damn. One thing I really need is a text shadow. UILabel has it. UITextView seems to not have it. But I guess that guy just uses the same underlying UIKit NSString additions?? Maybe someone already has a solution for that problem? What would I overwrite?

like image 844
dontWatchMyProfile Avatar asked May 17 '10 17:05

dontWatchMyProfile


1 Answers

text.layer.shadowColor = [[UIColor whiteColor] CGColor]; text.layer.shadowOffset = CGSizeMake(1.0f, 1.0f); text.layer.shadowOpacity = 1.0f; text.layer.shadowRadius = 1.0f; 

And don't forget to add up top:

#import <QuartzCore/QuartzCore.h> 
like image 144
adjwilli Avatar answered Oct 03 '22 12:10

adjwilli