Giter Site home page Giter Site logo

Working in xcode 13? about swiftui-drawer HOT 4 OPEN

maustinstar avatar maustinstar commented on May 29, 2024
Working in xcode 13?

from swiftui-drawer.

Comments (4)

maustinstar avatar maustinstar commented on May 29, 2024

Thanks for pointing this out. The docs are outdated, and the parameter should be a binding CGFloat array, not an Int array. Try using .constant([...]) with your numbers inside there, like in this example.

from swiftui-drawer.

mattpilott avatar mattpilott commented on May 29, 2024

I tried to use this today and despite resolving all issues and using this example, all i got was an empty app. I don't think it's working out of the box in xcode 13

Drawer {
    ZStack {
        
        RoundedRectangle(cornerRadius: 12)
            .foregroundColor(.white)
            .shadow(radius: 100)
        
        VStack(alignment: .center) {
            Spacer().frame(height: 4.0)
            RoundedRectangle(cornerRadius: 3.0)
                .foregroundColor(.gray)
                .frame(width: 30.0, height: 6.0)
            Spacer()
        }
    }
}.edgesIgnoringSafeArea(.vertical)
.rest(at: .constant([100, 340, UIScreen.main.bounds.height - 40]))
.impact(.light)

from swiftui-drawer.

CaryAndo avatar CaryAndo commented on May 29, 2024

Confirmed, if you create a new project and add the example code to it you get an empty app, even if you adjust for the @Binding like you mentioned. This project doesn't seem to work at all anymore.

from swiftui-drawer.

josipbernat avatar josipbernat commented on May 29, 2024

The code snipped from documentation doesn't work on Xcode 14 but following does:

Drawer(heights: .constant([100, 340])) {
    Color.blue
}.edgesIgnoringSafeArea(.vertical)

from swiftui-drawer.

Related Issues (12)

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.