Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadow height is not correct on iPad Portrait mode #14

Open
Sivamuhan-Sivasambu opened this issue Dec 4, 2015 · 0 comments
Open

Shadow height is not correct on iPad Portrait mode #14

Sivamuhan-Sivasambu opened this issue Dec 4, 2015 · 0 comments

Comments

@Sivamuhan-Sivasambu
Copy link

I added these changes to the code and it seems to work. But I am not sure wether it's correct way to do so?
// Create some shadowing
if (ShadowEnabled)
{
var frame = ContainerView.Layer.Bounds;
frame.Height = UIScreen.MainScreen.Bounds.Height > UIScreen.MainScreen.Bounds.Width ? UIScreen.MainScreen.Bounds.Height : UIScreen.MainScreen.Bounds.Width;
ContainerView.Layer.ShadowOffset = new CGSize(-5, 0);
ContainerView.Layer.ShadowPath = UIBezierPath.FromRect(frame).CGPath;
ContainerView.Layer.ShadowRadius = 3.0f;
ContainerView.Layer.ShadowColor = UIColor.Black.CGColor;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant