• Samer

    From a bit of searching it seems like prefersStatusBarHidden (source) returns true/false if the view controller is requesting the status bar to be hidden. Not sure if this would work, just thought I would through in what I found.

    posted in Pythonista read more
  • Samer

    @stephen There are two problems I encountered with that solution, the first is that when hide_title_bar=True The whole view is shifted down 20px. The second is that on my iPad it still jumps down a few pixels, yet it doesn’t on my iPhone. I wish the solution was that simple however it is unfortunately not.

    posted in Pythonista read more
  • Samer

    I took a few days to think about this bug/feature. I implemented a workaround for it which at the very least hides the problem. I don’t like it, but it works. If anyone has a better solution then overriding the present method, I would be happy to replace my current solution with it.

    posted in Pythonista read more
  • Samer

    @mikael huh, thats very strange I get the same effect using your example on my IPad Pro 11” (2018). It seems like initially the view overlaps with the info bar at the top of the screen (time, wifi, battery, etc) and upon touching the screen the view shifts down to not overlap with it. It’s hard to tell in your example due to the black text on black background. However if you set hide_title_bar to true in the built in example a similar effect happens. I will look into a fix in the next day or two.

    posted in Pythonista read more
  • Samer

    @mikael And with that all the changes are implemented.

    posted in Pythonista read more
  • Samer

    @stephen A bit of both, I have a project in the works that started out as a way to explore the ui module, it then morphed into learning about the objc_utils module a bit (MapView, ProgressView, UIPageControl) and then finally into wanting to create an app for the app store. This is just one part of a larger project. However I have probably had the most fun on this one part then all the others combined.

    posted in Pythonista read more
  • Samer

    I just edited the post with v0.4. Let me know what you people think!

    posted in Pythonista read more
  • Samer

    @mikael Thank you again for this feedback.

    What do you mean by:

    • Exposing a page_changed callback with a delegate parameter for self.

    I have not played around with callbacks very much and would appreciate some guidance on how to implement something like this.

    posted in Pythonista read more
  • Samer

    I have just edited the post with a new version. (v0.3 as i’m calling it).

    posted in Pythonista read more
  • Samer

    I have a quick question about:

    • The color properties are convenient, but return None if the defaults are not changed. I would prefer just to use a "reverse" color function, see below. It would have the additional benefit of removing the extra internal variables.
    def _py_color(self, objc_color):
       return tuple([c.floatValue() for c in objc_color.arrayFromRGBAComponents()])
    

    Specifically what you were referring to with arrayFromRGBAComponents() I wasn’t able to find a reference to it anywhere. Also i’m assuming that by objc_color I would be passing in the UIColor that _objc_color creates.
    Scratch that, Turns out I was passing in the wrong thing.

    Thank you everyone for all the help, I really appreciate it!

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!