antoniocasero / panels Goto Github PK
View Code? Open in Web Editor NEWPanels is a framework to easily add sliding panels to your application
License: MIT License
Panels is a framework to easily add sliding panels to your application
License: MIT License
Hi,
great project to reproduce Android bottom sheets.
It would be great to have a drag gesture that follow the movement, not just a toggle up/down.
Best.
Hi,
I've tried to put the material panel at the top of view controller but I couldn't. Is there any way to do this?
Installed Panels in my podfile, got the panel to work but i cant call curveTopCorners() anywhere
I have created a Panel and when it is called I call the show function on the panel. Everything works fine here.
lazy var panelManager = Panels(target: self)
let panel = UIStoryboard.instantiatePanel(identifier: "Timer")
var panelConfiguration = PanelConfiguration(size: .custom(230))
panelConfiguration.animateEntry = true
panelConfiguration.useSafeArea = false
panelConfiguration.respondToDrag = true
panelConfiguration.respondToTap = false
self.panelManager.show(panel: panel, config: panelConfiguration)
My issue arrises when I try to dismiss the panel using the panelManager.
self.panelManager.dismiss()
I'm calling the dismiss function when I Post to NotificationCenter that the timer was stopped. I'm using the PanelNotification to see when it is presented to begin observing when the timer will be stopped.
func panelDidPresented() {
isPannelOpen = true
panelDismissed = false
NotificationCenter.default.post(name: .CurrentSession, object: nil, userInfo: ["sessionInterval": sessionInterval,
"sessionClientName": sessionClientName])
NotificationCenter.default.addObserver(self, selector: #selector(timeLeft(notification:)), name: .TimeLeft, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(stopTimer(notification:)), name: .StopTimer, object: nil)
print("Did present")
}
@objc func stopTimer(notification: Notification) {
self.panelManager.dismiss()
self.timer?.invalidate()
self.timer = nil
NotificationCenter.default.removeObserver(self, name: .TimeLeft, object: nil)
NotificationCenter.default.removeObserver(self, name: .StopTimer, object: nil)
NotificationCenter.default.removeObserver(TimerViewController(), name: .CurrentSession, object: nil)
}
Initially it works and the panel will be dismissed, but when I scroll up or down on the table view...
I can't seem to figure out how to stop it from doing this. Does using NotificationCenter not work well with Panels?
Hi,
As the title said when I trying to select the UITextField in the panel. It will collapse to the button. Is there any settings can prevent this situation? Thanks.
Is it possible to show/present a panel from a view controller that is in a TabBar? I want to show a Panel and present it on top of the TabBar. Thanks
i think it should be support minimum version iOS 10?
Hi, this doesn't work on when presenting from a UITableViewController :(
The example app crashes while unwrapping an optional if you open the "Material" example, then open the panel and tap Close a few times.
movePanel(value:keyboard:completion:)
panelHeightConstraint!.constant = value
Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value
$ pod install
...
[!] Automatically assigning platform `ios` with version `11.2` on target `Panels_Example` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
The premise is relatively simple, looking at https://github.com/antoniocasero/Panels/blob/master/Sources/Panels.swift#L50 the safeAreaBottom is added to the PanelHeightConstraint every time show is being executed.
Now in my specific use case, I instantiate the Panelable VC with my parent VC and only show the Panel on didSelect, I dismiss it on didDeselect. With this behavior, the headerHeigh grows every time I execute show
which ends up pushing my header further down each time.
The examples show the same behavior (although, it's constraints break and recovery recovers the correct constraints).
Is there a way to build Panels without the need for Storyboard?
Followed all the steps and the demo project. But whenever I try call panel view controller, ti gives me the following errors
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView constant]: unrecognized selector sent to instance.
Hi,
I installed the panels pod and setup all the necessary code, then i launched the app on the simulator and everything works like a charm, but when i try to run on a real device the app crashs with the next error:
dyld: Library not loaded: @rpath/Panels.framework/Panels
Referenced from: /private/var/containers/Bundle/Application/4CA47637-BDFB-4473-9305-729F57C14B4A/Metro Sahel.app/Metro Sahel
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/4CA47637-BDFB-4473-9305-729F57C14B4A/Metro Sahel.app/Frameworks/Panels.framework/Panels: code signature invalid for '/private/var/containers/Bundle/Application/4CA47637-BDFB-4473-9305-729F57C14B4A/Metro Sahel.app/Frameworks/Panels.framework/Panels'
Xcode version : 11.3.1
Device used: iPhone 7 Plus / iOS 13.3.1
Hi,
I want to make the background screen dark like modalpresentationstype = .popover.
How can i do it?
many error. so i decided to using other lib
Panel
Any help?
Below is my code, took latest from pods (2.0.3)
if self.currentPanel != nil {
panelManager?.dismiss()
self.currentPanel = nil
} else {
currentPanel = UIStoryboard.instantiatePanel(identifier: "PanelOptions")
var panelConfiguration = PanelConfiguration(size: .custom(200))
panelConfiguration.panelVisibleArea = 30
panelManager?.show(panel: currentPanel as! UIViewController & Panelable, config: panelConfiguration)
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.