Git Product home page Git Product logo

Comments (10)

erwang01 avatar erwang01 commented on May 25, 2024 1

Are there more details you can provide @AMM001 ? Its hard to debug 8 lines of code in a screen shot.

Also, does the Storage Example build properly for you? The use of .cornerRadius is used there too. (StorageExampleViewController.swift:25)

from multiprogressview.

mac-gallagher avatar mac-gallagher commented on May 25, 2024

@AMM001 do you have an extension of UIView with a cornerRadius property on it? That would cause this issue

from multiprogressview.

mac-gallagher avatar mac-gallagher commented on May 25, 2024

If not, it is also possible that you are importing another framework along with MultiProgressView with such an extension

from multiprogressview.

AMM001 avatar AMM001 commented on May 25, 2024

@mac-gallagher yes in my project I have an extension of UIView with a cornerRadius

but I can not change it cause a lot of views in project used it :( !

are u have any solution of this please
thank u .

from multiprogressview.

mac-gallagher avatar mac-gallagher commented on May 25, 2024

@AMM001 you can just rename your property to something unique like cornerRadius_ and do the following:

extension UIView {

    var cornerRadius_: CGFloat {
        set {
            layer.cornerRadius = newValue
        }
        get {
            return layer.cornerRadius
       }
    }
}

Let me know if that works

from multiprogressview.

AMM001 avatar AMM001 commented on May 25, 2024

@mac-gallagher I don't like to change in extension , can u find a another solution with no change in property in extension .

just look at this : AssistoLab/DropDown#192 (comment)

thanks

from multiprogressview.

mac-gallagher avatar mac-gallagher commented on May 25, 2024

@AMM001 Alternatively, you can extend MultiProgressView somewhere in your project:

import MultiProgressView

extension MultiProgressView {

  var mpv_cornerRadius: CGFloat {
    get {
      return super.cornerRadius
    }
    set {
      super.cornerRadius = newValue
    }
  }
}

(the call to super.cornerRadius here would reference the cornerRadius property defined in Shuffle and not the one in your project.) You can then do

let progressView = MultiProgressView()
progressView.mpv_cornerRadius = 4

Does this work? I would rather not make any direct changes to the repo for your specific case.

from multiprogressview.

AMM001 avatar AMM001 commented on May 25, 2024

@mac-gallagher this solution doesn't work , I'm sorry for this

the view doesn't take a corner radius

from multiprogressview.

mac-gallagher avatar mac-gallagher commented on May 25, 2024

I just added the UIView extension (with the name cornerRadius) and the MultiProgressView extension above into the example project and it worked fine. Can you share more details? Perhaps a sample project?

from multiprogressview.

mac-gallagher avatar mac-gallagher commented on May 25, 2024

Actually nevermind, it only complied but did not actually have the desired effect

In any case, this is not an issue with the repo but rather an issue with your naming convention. If you also add a similar UIView extension for borderWidth or borderColor for example, you will run into the same "Ambiguous use of ..." error since MultiProgressView is a subclass of UIView. This is not the fault of the framework, so closing this issue.

from multiprogressview.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.