Coder Social home page Coder Social logo

Comments (10)

daskaliuk avatar daskaliuk commented on June 14, 2024 1

Value of type 'FloatingPanelController?' has no member 'panGestureRecognizer'

from floatingpanel.

scenee avatar scenee commented on June 14, 2024

Here I would like to drag the view even if I drag the tab bar. In other words, I have to detect the tab bar drag event and pass it to the underneath view.

I'm sorry I can't imagine this use case... Could you please give me a screen capture video?

from floatingpanel.

Thavasidurai avatar Thavasidurai commented on June 14, 2024

Thanks for the quick response!
Here is the use case
ezgif com-video-to-gif

from floatingpanel.

scenee avatar scenee commented on June 14, 2024

Thanks, @Thavasidurai. What's a problem in FloatngPanel library?

from floatingpanel.

Thavasidurai avatar Thavasidurai commented on June 14, 2024

There is no issue in the library. I am just requesting help or raising a feature request to solve my use case.

Is there any provision to call something from parent view controller which moves up the FloatngPanel? If so, I can get the touch point from the tab bar and pass it to the FloatngPanel. I hope this would solve my problem.

If you know any other better approach to solve my use case, please guide me.

Thanks in advance!

from floatingpanel.

Thavasidurai avatar Thavasidurai commented on June 14, 2024

I am getting expected output following an ugly way!

I just added a pan gesture to the tab bar and passed it to the floating panel's handle pan gesture method it's working perfectly but I need to modify the library code to change the access control to public from private. I know this is not the right approach, Is there any other way to handle it nicely or Is it possible to provide any other provision in the library to handle it without touching library code?

from floatingpanel.

scenee avatar scenee commented on June 14, 2024

I just added a pan gesture to the tab bar and passed it to the floating panel's handle pan gesture method it's working perfectly but I need to modify the library code to change the access control to public from private.

Sounds great. I'd like to consider a better approach. Could you let me know which method you changed?

from floatingpanel.

Thavasidurai avatar Thavasidurai commented on June 14, 2024

Thanks again for your quick response! @scenee
I made all the required changes to access the @objc func handle(panGesture: UIPanGestureRecognizer) method from my view controller class so that I can pass whatever I receive from tab bar pan gesture handling method.

Below are my change logs

  1. In FloatingPanelController.swift file, line number 128
    private var floatingPanel: FloatingPanel! to public var floatingPanel: FloatingPanel!

  2. In FloatingPanel.swift file, line number 10
    class FloatingPanel: to public class FloatingPanel:

  3. In FloatingPanel.swift file, line number 750
    override func responds(to aSelector: Selector!) to override public func responds(to aSelector: Selector!)

  4. In FloatingPanel.swift file, line number 754
    override func forwardingTarget(for aSelector: Selector!) to override public func forwardingTarget(for aSelector: Selector!)

  5. In FloatingPanel.swift file, line number 258
    @objc func handle(panGesture: UIPanGestureRecognizer) to @objc public func handle(panGesture: UIPanGestureRecognizer)

from floatingpanel.

scenee avatar scenee commented on June 14, 2024

How about adding a target to FloatingPanleController.panGestureRecognizer?

    fpc.panGestureRecognizer.addTarget(self, action: #selector(handleFloatingPanel(panGesture:)))
    ...
}
@objc func handleFloatingPanel(panGesture: UIPanGestureRecognizer) {
    // Do something
}

from floatingpanel.

scenee avatar scenee commented on June 14, 2024

I added panGestureRecognizer property in FloatingPanelController on v1.1.0 🙂
https://github.com/SCENEE/FloatingPanel/blob/master/Framework/Sources/FloatingPanelController.swift#L86

from floatingpanel.

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.