omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. ProfSpaceCadet

    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.


    • Profile
    • Following 0
    • Followers 1
    • Topics 2
    • Posts 4
    • Best 3
    • Controversial 0
    • Groups 0

    ProfSpaceCadet

    @ProfSpaceCadet

    3
    Reputation
    987
    Profile views
    4
    Posts
    1
    Followers
    0
    Following
    Joined Last Online

    ProfSpaceCadet Unfollow Follow

    Best posts made by ProfSpaceCadet

    • Pydia: A package installer for Pythonista

      Pydia Installer.py: https://gist.github.com/bmw1821/d9883042b95a818e6429

      Source Code: https://gist.github.com/bmw1821/bc2ccf257d60804be010

      posted in Pythonista
      ProfSpaceCadet
      ProfSpaceCadet
    • RE: [Share Code] Touch ID Authentication in Pythonista

      I made a module based on your code: https://gist.github.com/d44b83d80f2f77e4f832

      To run it you just call authenticate() with an optional string if you want to supply a reason. It will return True if the user authenticated (with either TouchID or passcode) and False if it was cancelled.

      posted in Pythonista
      ProfSpaceCadet
      ProfSpaceCadet
    • How can I present a UIAlertController?

      I am working on a Pythonista script that displays a UITabBarController, which contains multiple UINavigationControllers, containing UITableViewControllers. At some point I need to display a UIAlertController, but all the methods I've tried to present it either crash the app or push the UIAlertController to the navigation stack.

      My code:

      
      from objc_util import *
      from UIKit import *
          
      alert = UIAlertController.alertControllerWithTitle_message_preferredStyle_('Title', 'Message', 0)
      def alertActionCancel(sender):
        print 'Cancelled!'
      alertActionCancelBlock = ObjCBlock(alertActionCancel, None, [c_void_p])
      retain_global(alertActionCancelBlock)
      alert.addAction_(UIAlertAction.actionWithTitle_style_handler_('Cancel', 1, alertActionCancelBlock))
      myTableViewController.presentViewController_animated_completion_(alert, True, None) # This line crashes Pythonista
      

      Thanks in advance, any help is greatly appreciated.

      posted in Pythonista
      ProfSpaceCadet
      ProfSpaceCadet

    Latest posts made by ProfSpaceCadet

    • Pydia: A package installer for Pythonista

      Pydia Installer.py: https://gist.github.com/bmw1821/d9883042b95a818e6429

      Source Code: https://gist.github.com/bmw1821/bc2ccf257d60804be010

      posted in Pythonista
      ProfSpaceCadet
      ProfSpaceCadet
    • RE: [Share Code] Touch ID Authentication in Pythonista

      I made a module based on your code: https://gist.github.com/d44b83d80f2f77e4f832

      To run it you just call authenticate() with an optional string if you want to supply a reason. It will return True if the user authenticated (with either TouchID or passcode) and False if it was cancelled.

      posted in Pythonista
      ProfSpaceCadet
      ProfSpaceCadet
    • RE: How can I present a UIAlertController?

      I have tried using SUIViewConrroller, but Pythonista still crashes. viewControllerForView_ seems to just return my original view controller.

      P.S. This seems to be more of a issue on iPad.

      posted in Pythonista
      ProfSpaceCadet
      ProfSpaceCadet
    • How can I present a UIAlertController?

      I am working on a Pythonista script that displays a UITabBarController, which contains multiple UINavigationControllers, containing UITableViewControllers. At some point I need to display a UIAlertController, but all the methods I've tried to present it either crash the app or push the UIAlertController to the navigation stack.

      My code:

      
      from objc_util import *
      from UIKit import *
          
      alert = UIAlertController.alertControllerWithTitle_message_preferredStyle_('Title', 'Message', 0)
      def alertActionCancel(sender):
        print 'Cancelled!'
      alertActionCancelBlock = ObjCBlock(alertActionCancel, None, [c_void_p])
      retain_global(alertActionCancelBlock)
      alert.addAction_(UIAlertAction.actionWithTitle_style_handler_('Cancel', 1, alertActionCancelBlock))
      myTableViewController.presentViewController_animated_completion_(alert, True, None) # This line crashes Pythonista
      

      Thanks in advance, any help is greatly appreciated.

      posted in Pythonista
      ProfSpaceCadet
      ProfSpaceCadet