user1686342
user1686342

Reputation: 1345

How do I add a shadow to the bottom of a UIVIew

I have this code so far, but I just want a shadow at the bottom of a myView

myView.layer.shadowColor = [UIColor grayColor].CGColor;
myView.layer.shadowOffset = CGSizeMake(5, 5);
myView.layer.shadowOpacity = 1;
myView.layer.shadowRadius = 1.0;

Upvotes: 1

Views: 4359

Answers (1)

beyowulf
beyowulf

Reputation: 15321

Change

myView.layer.shadowOffset = CGSizeMake(5, 5);

to

myView.layer.shadowOffset = CGSizeMake(0, 5);

see if that works for you.

Upvotes: 2

Related Questions