Closed iTollMouS closed 3 years ago
?
can @iTollMouS elaborate?
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))
})
}
}
}
}
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
@iTollMouS ,
So you should update the title of the issue like this:
Can't make custom popup close button.
Apologies
Just dumping code and expecting answers is not a good way to ask for help. Nobody here works for you or owes you something.
apologies, it is the first time for me to do this . Thanks for notifying me as I'm learning how to report properly ✌️😬
Found a bug in the internal logic. Will push a fix in a few minutes.
[cid:2A9D63CF-CB97-4EC4-AC2A-E37E697FA0B0]
Thank you.
On Nov 23, 2020, at 8:41 PM, Leo Natan notifications@github.com wrote:
Found a bug in the internal logic. Will push a fix in a few minutes.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/LeoNatan/LNPopupUI/issues/5#issuecomment-732316809, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHXPK5IONRT3GUYRB35WFP3SRKNDPANCNFSM4T6WQGXA.
It's a more elaborate change than I thought, found more issues. Will fix it soon.
Please try with 1.2.7. Thanks
Thanks for the fixing . It is working !!
From: Leo Natan notifications@github.com Sent: Monday, November 23, 2020 5:46 PM To: LeoNatan/LNPopupUI LNPopupUI@noreply.github.com Cc: iTollMouS tariq.almazyad@hotmail.com; Mention mention@noreply.github.com Subject: Re: [LeoNatan/LNPopupUI] Can't make custom popup close button. (#5)
Please try with 1.2.7. Thanks
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/LeoNatan/LNPopupUI/issues/5#issuecomment-732470090, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHXPK5MCHUB2DYJ3IQS3DKDSRLQ2VANCNFSM4T6WQGXA.
Great!
Thanks, Leo Natan
On Nov 24, 2020, at 00:55, iTollMouS notifications@github.com wrote:
Thanks for the fixing . It is working !!
From: Leo Natan notifications@github.com Sent: Monday, November 23, 2020 5:46 PM To: LeoNatan/LNPopupUI LNPopupUI@noreply.github.com Cc: iTollMouS tariq.almazyad@hotmail.com; Mention mention@noreply.github.com Subject: Re: [LeoNatan/LNPopupUI] Can't make custom popup close button. (#5)
Please try with 1.2.7. Thanks
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/LeoNatan/LNPopupUI/issues/5#issuecomment-732470090, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHXPK5MCHUB2DYJ3IQS3DKDSRLQ2VANCNFSM4T6WQGXA.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/LeoNatan/LNPopupUI/issues/5#issuecomment-732473465, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AARKJYNAAGAXETSE7CVQLB3SRLR4XANCNFSM4T6WQGXA.