Coder Social home page Coder Social logo

Comments (14)

iDevelopper avatar iDevelopper commented on July 18, 2024 1

@iTollMouS ,

So you should update the title of the issue like this:

Can't make custom popup close button.

from lnpopupui.

LeoNatan avatar LeoNatan commented on July 18, 2024 1

It's a more elaborate change than I thought, found more issues. Will fix it soon.

from lnpopupui.

LeoNatan avatar LeoNatan commented on July 18, 2024

?

from lnpopupui.

iDevelopper avatar iDevelopper commented on July 18, 2024

can @iTollMouS elaborate?

from lnpopupui.

iTollMouS avatar iTollMouS commented on July 18, 2024
import SwiftUI
import LNPopupUI

struct AppetizerTabView: View {
    
    _**@State var isPopupOpen: Bool = false**_  <-- this state controls when popup is open / close 
    
    var body: some View {
        TabView{
            AppetizerListView()
                .tabItem {
                    Image(systemName: "house")
                    Text("Home")
                }
            AccountView()
                .tabItem {
                    Image(systemName: "person")
                    Text("Account")
                }
            
            OrderView()
                .tabItem {
                    Image(systemName: "bag")
                    Text("Home")
                }
        }
        
        .popup(isBarPresented: .constant(true) , isPopupOpen: $isPopupOpen , popupContent: {
            **_Button(action: {
                self.isPopupOpen.toggle() <- in second View , I want to make a button that dismiss the popup , but this button doesn't work 
            }, label: {
                Image(systemName: "info.circle")
                    .resizable()
                    .frame(width: 30, height: 30)
                    .foregroundColor(Color(.lightGray))
            })_**
        })
        
        .popupInteractionStyle(.drag)
        .popupBarCustomView(wantsDefaultTapGesture: false, wantsDefaultPanGesture: true, wantsDefaultHighlightGesture: false) {
            HStack(spacing: 24){
                Text("Choose any user to\ndisplay coding activity")
                    .font(.system(size: 16, weight: .light))
                    .foregroundColor(.black)
                    .frame(height: 40)
                    .lineLimit(nil)
                    .multilineTextAlignment(.center)
                    .padding(10)
                    .padding(.leading)
                Button(action: {
                    self.isPopupOpen.toggle()
                }, label: {
                    Image(systemName: "info.circle")
                        .resizable()
                        .frame(width: 30, height: 30)
                        .foregroundColor(Color(.black))
                })
            }
        }
    }
}

from lnpopupui.

iTollMouS avatar iTollMouS commented on July 18, 2024

I want to make a button of my design for popup dismissal , but idk why it doesnt work .
Here is a video demo https://streamable.com/umkyq8

from lnpopupui.

iTollMouS avatar iTollMouS commented on July 18, 2024

Apologies

from lnpopupui.

LeoNatan avatar LeoNatan commented on July 18, 2024

Just dumping code and expecting answers is not a good way to ask for help. Nobody here works for you or owes you something.

from lnpopupui.

iTollMouS avatar iTollMouS commented on July 18, 2024

apologies, it is the first time for me to do this . Thanks for notifying me as I'm learning how to report properly ✌️😬

from lnpopupui.

LeoNatan avatar LeoNatan commented on July 18, 2024

Found a bug in the internal logic. Will push a fix in a few minutes.

from lnpopupui.

iTollMouS avatar iTollMouS commented on July 18, 2024

from lnpopupui.

LeoNatan avatar LeoNatan commented on July 18, 2024

Please try with 1.2.7. Thanks

from lnpopupui.

iTollMouS avatar iTollMouS commented on July 18, 2024

from lnpopupui.

LeoNatan avatar LeoNatan commented on July 18, 2024

from lnpopupui.

Related Issues (20)

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.