omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Haptic feedback?

    Pythonista
    haptic vibration
    2
    3
    1577
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • shinyformica
      shinyformica last edited by

      Does pythonista come with a module for accessing the haptic feedback/vibration abilities of iOS? Something akin to the motion or sound modules, but for causing vibrations?

      I'm not seeing anything...but before I delve into objective-c bridging to the UIFeedbackGenerator API, I thought I'd ask.

      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by ccc

        site:forum.omz-software.com Haptic

        https://forum.omz-software.com/topic/3647/accessing-the-taptic-engine

        from objc_util import ObjCClass
        
        def taptic(n: int = 2): -> None:
            ObjCClass('UIDevice').new()._tapticEngine().actuateFeedback_(n)
        
        1 Reply Last reply Reply Quote 0
        • shinyformica
          shinyformica last edited by

          So no python-native library, but that'll do nicely.
          Love it, thanks!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors