Giter Club home page Giter Club logo

Comments (2)

iMacHumphries avatar iMacHumphries commented on August 15, 2024

Hello, thanks for submitting this issue, and sorry for the late response. It is hard for me to see what is going on here. Would you mind sharing how you are programmatically starting Hyperion?

The Attributes Inspector works by capturing a snapshot of the current application window. If you are trying to programmatically start the Attributes Inspector you will want to do this after the action sheet has been dismissed. The snapshot that is captured intercepts interaction with your application window.

I am not sure if this will help but here is how we dismiss a plugin:

-(void)pluginMenuItemSelected:(UIView *)pluginView

You could try something like this, but I am not sure if this will work for what you are trying to do:

        if let hplugins = HyperionManager.sharedInstance().retrievePluginModules() {
            for p in hplugins {
                p.extension.snapshotContainer.overlayModule = nil
                HyperionManager.sharedInstance().togglePluginDrawer()
            }
        }

from hyperion-ios.

mshibanami avatar mshibanami commented on August 15, 2024

Thank you. And sorry for lack of the information.
My code is here:

    override func motionBegan(_ motion: UIEventSubtype, with event: UIEvent?) {
        super.motionBegan(motion, with: event)

        let mainAlert = UIAlertController(
            title: "Debug Mode",
            message: nil,
            preferredStyle: .actionSheet)

        mainAlert.addAction(
            UIAlertAction(
                title: "🌞 Launch Hyperion",
                style: .default,
                handler: { _ in
                    HyperionManager.sharedInstance()
                        .togglePluginDrawer()
            }))

        mainAlert.addAction(
            UIAlertAction(
                title: "Cancel",
                style: .cancel,
                handler: nil))

        self.present(
            mainAlert,
            animated: true,
            completion: nil)
    }

And thanks to you, I wrote the following code:

        if let hplugins = HyperionManager.sharedInstance().retrievePluginModules() {
            for p in hplugins {
                p.extension.snapshotContainer.overlayModule = nil
            }
            HyperionManager.sharedInstance().togglePluginDrawer()
            HyperionManager.sharedInstance().togglePluginDrawer()
        }

Double togglePluginDrawer() is bit ugly. but at least it works. Thanks!

from hyperion-ios.

Related Issues (18)

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.