Skip to content

Drop shadow issue #98

@ahmetcanakgl

Description

@ahmetcanakgl

I ve tried to give bottom drop shadow to headerView but none of them worked, is there anything should I know ? I ve tried these code blocks:

headerView.layer.shadowOpacity = 1
headerView.layer.shadowOffset = CGSize(width: 0, height: 1)
headerView.layer.shadowRadius = 1

let layer : CAGradientLayer
layer.colors = [fromColor.cgColor, toColor.cgColor]
layer.shadowRadius = 1
layer.startPoint = CGPoint(x: 0.5, y: 1.0)
layer.endPoint = CGPoint(x: 0.5, y: 0.0)
layer.frame = CGRect(x: 0.0, y: headerView.frame.height - shadowRadius, width: headerView.frame.width, height: shadowRadius)
headerView.layer.addSublayer(layer)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions