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

create get/set functions for cornerRadius #379

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions PopupDialog/Classes/PopupDialogContainerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@ final public class PopupDialogContainerView: UIView {
}
}

/*
Having `cornerRadius` variable will create ambiguity with developers having it as a UIView extension.
In order to help them out, we can have functions doing the same functionality.
*/
/// Set the corner radius of the popup view
@objc public dynamic func setCornerRadius(_ radius: Float) {
let radius = CGFloat(radius)
shadowContainer.layer.cornerRadius = radius
container.layer.cornerRadius = radius
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

/// Get the corner radius of the popup view
@objc public dynamic func getCornerRadius() -> Float {
return Float(shadowContainer.layer.cornerRadius)
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

// MARK: Shadow related

/// Enable / disable shadow rendering of the container
Expand Down