Code Monkey home page Code Monkey logo

panels's People

Contributors

antoniocasero avatar chalkdust avatar jondwillis avatar julianschiavo avatar ykws avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

panels's Issues

need some help

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?

Panel reopens after being dismissed

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...
weirdgrandioseghostshrimp-size_restricted

I can't seem to figure out how to stop it from doing this. Does using NotificationCenter not work well with Panels?

Show the Panels on top of a TabBar

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

keyboard present and Penel moves up with the keyboard

Hi
I am getting this behavior when a panel is present and the keyboard is opened. Penel moves up and fits the keyboard top(below picture).
How to stop this behavior?
I have tried keyboard observer too but no success yet.
conf.keyboardObserver = false
Thanks for this nice library.

IMG_475D92C76697-1

Example app crashes if you tap "Close" twice

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

Specify a platform for this target in Example Podfile

$ 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`.

HeaderHeight calculation pushes Header further down with each show

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).

'NSInvalidArgumentException

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.

crash when running on real device

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'

Capture d’écran 2020-03-05 à 11 24 28 PM

Xcode version : 11.3.1
Device used: iPhone 7 Plus / iOS 13.3.1

2nd time dismiss animation works but panel stay

Panel

  1. Show
  2. Dismiss
  3. Show
  4. Dismiss (Here after dismiss animation, panel stay remain on visible position )

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)
            }

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.