Giter Site home page Giter Site logo

Comments (6)

kokitang avatar kokitang commented on July 28, 2024
if corners.contains(.bottomLeft) {
                    cornerMask.update(with: .layerMinXMinYCorner)
                }
                if corners.contains(.bottomRight) {
                    cornerMask.update(with: .layerMaxXMinYCorner)
                }
                if corners.contains(.topLeft) {
                    cornerMask.update(with: .layerMinXMaxYCorner)
                }
                if corners.contains(.topRight) {
                    cornerMask.update(with: .layerMaxXMaxYCorner)
                }

Should be:

if corners.contains(.bottomLeft) {
                    cornerMask.update(with: .layerMinXMaxYCorner)
                }
                if corners.contains(.bottomRight) {
                    cornerMask.update(with: .layerMaxXMaxYCorner)
                }
                if corners.contains(.topLeft) {
                    cornerMask.update(with: .layerMinXMinYCorner)
                }
                if corners.contains(.topRight) {
                    cornerMask.update(with: .layerMaxXMinYCorner)
                }

from bfkit.

kokitang avatar kokitang commented on July 28, 2024

in iOS 10:
2018-07-10 2 13 59

in iOS 11:
2018-07-10 2 14 18

Code:
cornerRadius(corners: [.topLeft, .topRight, .bottomRight], radius: 16)

from bfkit.

FabrizioBrancati avatar FabrizioBrancati commented on July 28, 2024

Thanks! Why not open a pull request? 😄
Just a question, they changed the Y asix on iOS 11?

from bfkit.

kokitang avatar kokitang commented on July 28, 2024

Haha.. My source control software having some issue on push code to GitHub..

I don't think they changed the Y axis stuffs on iOS 11 due to coordinate x: 0, y: 0 is top-left corner. And in your original code you state .bottomLeft is minimum X and minimum Y, so it's not correct obviously.

from bfkit.

FabrizioBrancati avatar FabrizioBrancati commented on July 28, 2024

Ahah ok I will fix it.
I don't understand your previous comment, both the images are generated by the same code cornerRadius(corners: [.topLeft, .topRight, .bottomRight], radius: 16)?
Or is a "How is now" and "How has to be"?

from bfkit.

FabrizioBrancati avatar FabrizioBrancati commented on July 28, 2024

@kokitang News about that issue?

from bfkit.

Related Issues (18)

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.