Can anyone tell me, how to make shadow, using UIPageViewController, around of my background image instead of the view bounds?
In other words, I have an "irregular background image" which bounds looks like a wave. And when I go from page to page, shadow must be around "waves of backgrounds image" instead of pages rectangle.
Thanks.
You can use the QuartzCore.framework.
Every UIView has a CALayer which can help u on that
Then you can do something like:
- (void) stylingUIView:(UIView *) _view
{
[_view.layer setBorderWidth:3]; // add border to the UIView
[_view.layer setBorderColor:[UIColor colorWithRed:0.7f green:0.7f blue:0.7f alpha:0.2].CGColor]; // set border Color for the UIView
[_view.layer setShadowColor:[UIColor blackColor].CGColor]; //set shadow color for the UIView
[_view.layer setShadowRadius:10]; // set Shadow radius
}
For your case: You can do something like:
[(UIViewController) viewController.view.layer setShadowRadius:10];
[(UIImageView) *imageView setShadowRadius:10];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With