• scorpid

    @scorpid

    # your custom view class
    class Piece(ui.View):
    #the did-load method is called after the form (designer) file is loaded...so are views are accessible from code
        def did_load(self):
          #here you would load a local image...based on the type of chess piece
    self['imageview1'].load_from_url('https://image.flaticon.com/icons/png/128/36/36189.png')
    

    posted in Pythonista read more
  • scorpid

    Hi, in the view designer, you can place subviews, so you could place an ImageView to manage the chess piece image. Since your view uses a custom class, you can load the appropriate image by referencing the image subview.

    The example below needs some work, but should give a general idea.

    # your custom view class
    class Piece(ui.View):
    #the did-load method is called after the form (designer) file is loaded...so are views are accessible from code
        def did_load(self):
          #here you would load a local image...based on the type of chess piece  self['imageview1'].load_from_url('https://image.flaticon.com/icons/png/128/36/36189.png')
    

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!