Comments (14)
So you should update the title of the issue like this:
Can't make custom popup close button.
from lnpopupui.
It's a more elaborate change than I thought, found more issues. Will fix it soon.
from lnpopupui.
?
from lnpopupui.
can @iTollMouS elaborate?
from lnpopupui.
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.
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.
Apologies
from lnpopupui.
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.
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.
Found a bug in the internal logic. Will push a fix in a few minutes.
from lnpopupui.
from lnpopupui.
Please try with 1.2.7. Thanks
from lnpopupui.
from lnpopupui.
from lnpopupui.
Related Issues (20)
- Change color of now playing bar background HOT 5
- popup bar and popup content can get stuck in wrong position when dismissing a modal sheet with the keyboard in a transitory state HOT 20
- iOS 15.2 has broken safe area insets under some conditions HOT 1
- LNPopupController: The popup controller is already in transition. Will ignore this transition request. HOT 2
- Using a custom view for the popup bar breaks presentation/dismiss animations HOT 4
- Run the example project HOT 1
- How to cooperate with withAnimation(...) when switching PopupOpen HOT 1
- After adding .popupBarStyle(.prominent) or .popupBarProgressViewStyle(.top) or .popupBarMarqueeScrollEnabled(true) to the View hierarchy, iOS keyboard will resign after single keypress HOT 3
- Possible regression between 1.4.0 and 1.4.1 in popupBarItems HOT 4
- Can't build test target while using LNPopupUI HOT 5
- Gesture Conflict HOT 3
- Interaction Style issues HOT 5
- State management breaks on quick opening/closing of the popup HOT 10
- Popover's background Scale Effect HOT 1
- Making isBarPresented = true, while its animating closed when set to false causes the popup to become bugged until open/closed again HOT 12
- Make popup image nullable
- Updating popup content while popup is closing causes popup to get stuck in a loop of closing and opening endlessly. HOT 6
- popupBarCustomView produces too much padding HOT 2
- Inconsistent Scrolling in PopupView HOT 2
- Limiting dragging area HOT 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lnpopupui.