iOS: Adding a drop shadow in an image
You can just modify the x,y and width and height values inside the CGRectMake to make adjustments for your object's relative coordinates and you can also adjust as well the radius, opacity and offset of the shadow.
Make sure your self.contentView is the view where your image is shown, and take note that your image must be added after the shadow, not before the shadow so it'll be behind the image.
By adding an image, just do after the code above somewhat like,
Make sure your self.contentView is the view where your image is shown, and take note that your image must be added after the shadow, not before the shadow so it'll be behind the image.
By adding an image, just do after the code above somewhat like,
self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"CellImageTest.png"]];
[self.contentView addSubview:self.imageView];
Comments
Post a Comment