• rb

    Yeah the real ants is what I was looking for obvs!

    Thanks guys :)
    I think I just really needed to understand that it’s not
    .set_line_dash(sequence [,phase])
    but more like:
    .set_line_dash([10,15,10,15] ,phase)

    Which is what was confusing me..

    posted in Pythonista read more
  • rb

    How would I go about making a marching ants/continuously shifting dashed line effect between 2 fixed points using ui.animate anyone?

    posted in Pythonista read more
  • rb

    I’m actually using the reload method and it seems fine - I guess it’s just really inefficient is that what your saying @JonB ?
    Thanks for help so far everyone.

    posted in Pythonista read more
  • rb

    I’m trying to fill a tableView with rows one after the other with a slight delay between each cell appearing.

    This is how I’m trying to do it - but they all still appear in one go:

    def tableview_cell_for_row(tableview, section, row):
        cell =ui.TableViewCell("subtitle")
        data = tableview.data_source.items[row]
        cell.bg_color = (0,1,0,0.1)
        cell.text_label.font= ('system',(17*Hmult))
        cell.text_label.text_color = (0,1,0,0.0)
        cell.text_label.text = str(data)
        selected_cell = ui.View()
        selected_cell.bg_color = (0,1,0,0.2)
        selected_cell.text_color = (0,1,0,1.0)
        cell.selected_background_view = selected_cell
        def anim():
            if len(tableview.data_source.items) != row:
                cell.text_label.text_color = (0,1,0,0.5)
        return cell

    posted in Pythonista read more
  • rb

    Thankyou for that got it working at last :). I need to set each cells bg rather than the table - got it.

    posted in Pythonista read more
  • rb

    Hi what is the secret to getting a table view from ui designer to overlay onto a background such that only the text is visible and the cells have no background?
    I have tried setting bg_color of data source and/or table view to none but it’s not happening.ie each cell is always white.
    I can remove white separator lines using tableView.separator_color=(1,0,0,0).
    Why won’t the same work for .bg_color and/or .background_color (and what is the difference between those two anyhow?)
    Thanks in advance for any help :)
    What am I missing here?

    posted in Pythonista read more
  • rb

    @mikael awesome I will check this out looks like exactly what I’m after thankyou :)

    posted in Pythonista read more
  • rb

    That’s great thanks for explaining !
    Im a little confused about a couple of things:

    Why do I need to redeclare the bgLines view?


    In my case I have made a pyui file that contains the bgLines custom view but pushed to the back.
    So is it necessary to subView the buttons/bgLines ? or. Or is there an arrangement of subviews in the UI editor that would get all this working?
    I have it working your way but if I am able to reduce any further editing of views etc outside of the UI designer that would be ideal.

    If not no probs - just trying to understand the inheritance of the views via the designer.

    Ie isn’t the blank canvas of the designer effectively the root ? So if I add a custom view push it to the back and then add a button etc isn’t this the same as :


    Thanks again for your help!

    posted in Pythonista read more
  • rb

    Ok my original post was a bit of a wacky scene/ui mutation - say I have this code below and want it to play in the bg of a UI that I have constructed using UI designer:

    class bgLines(ui.View):
        def __init__(self):
            self.w = ui.get_screen_size()[0]
            self.h = ui.get_screen_size()[1]    
            for v in range(0,random.randint(10,int(self.h/4))):

    How do I layer the UI elements to correctly reveal the bg undearneath?
    I have set their alphas to 0.5 but I’m not seeing the bgLines view underneath.
    Do I need to subview the elements that are on top to the bgLines view?

    Any help appreciated

    posted in Pythonista read more
  • rb

    Thankyou! Exactly what I wanted - delay() was what I needed

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!