The Wayback Machine - https://web.archive.org/web/20201117164015/https://github.com/SwifterSwift/SwifterSwift/issues/909
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

Ambiguous use of 'cornerRadius' #909

Open
RaulVan opened this issue Oct 10, 2020 · 6 comments
Open

Ambiguous use of 'cornerRadius' #909

RaulVan opened this issue Oct 10, 2020 · 6 comments

Comments

@RaulVan
Copy link

@RaulVan RaulVan commented Oct 10, 2020

  1. Found this candidate (AuthenticationServices.ASAuthorizationAppleIDButton)
  2. Found this candidate (SwifterSwift.UIView)
@yanpanpan
Copy link
Contributor

@yanpanpan yanpanpan commented Oct 12, 2020

you can quick fix this issue like below: appleBtn.setValue(24, forKey: "cornerRadius"). It's ugly, I cannot find out a better solution.

@guykogus
Copy link
Contributor

@guykogus guykogus commented Oct 12, 2020

Can you show your code? You can import specific structs/functions/etc. What imports do you have in that file? Are you using ASAuthorizationAppleIDButton?

@yanpanpan
Copy link
Contributor

@yanpanpan yanpanpan commented Oct 12, 2020

Yes, I face the same problem when using ASAuthorizationAppleIDButton .
This code import setter AuthenticationServices.ASAuthorizationAppleIDButton.cornerRadius can not work.

@yanpanpan
Copy link
Contributor

@yanpanpan yanpanpan commented Oct 12, 2020

SomeViewController.swift

import AuthenticationServices

class SomeViewController: UIViewController {
    func someFunc() {
        let appleBtn = ASAuthorizationAppleIDButton()
        appleBtn.cornerRadius = 5
    }
}

AnotherViewController.swift

import SwifterSwift
class AnotherViewController: UIViewController{}

This should reproduce the compiler error.

@Jayxiang
Copy link
Contributor

@Jayxiang Jayxiang commented Oct 14, 2020

Same as #622 , rename this? @LucianoPAlmeida

@LucianoPAlmeida
Copy link
Member

@LucianoPAlmeida LucianoPAlmeida commented Oct 15, 2020

@Jayxiang yeah, I think we don't have many options in this case besides renaming. For those layer wrapper properties insert a layer prefix should be good. But we should probably audit those computed properties in the library that are likely to have naming conflicts.

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.