I cannot get the imageview to update. Not sure exactly how to use this, but here’s the code.
image = photos.pick_asset(multi=False)
img = image.get_ui_image()
imageView = ui.ImageView('image')
imageView.image = img
I cannot get the imageview to update. Not sure exactly how to use this, but here’s the code.
image = photos.pick_asset(multi=False)
img = image.get_ui_image()
imageView = ui.ImageView('image')
imageView.image = img
It looks like the image is set correctly, but you're never actually showing the image view. Add something like imageView.present() at the end.
I did present. And it caused the image to show in the console or something not in the view
@robertiii Are you sure that you used imageView.present() and not img.show()?
Yes. It only shows a pop-up with the photo
Okay, and what did you expect?
How do I select an imageView in a pyui. That may be the problem
Can you be a bit more specific? I'm not sure what exactly you're talking about.
I have an imageView on the pyui. Whenever I say present it presents in full screen not to the imageView. How do i set the imageView to display the image rather than showing the sheet or full screen.
Okay, so you have a .pyui file that you load via ui.load_view, right? load_view returns the "main" view that was loaded. The image view you created in the UI editor has a "name" (by default something like 'imageview1') that you can set in the inspector panel.
You can access subviews of the "main" view using subscript notation, like this:
# ...
# img = ...
v = ui.load_view('myui.pyui')
img_view = v['imageview1']
img_view.image = img
I figured it out though I’m not exactly sure what I did differently! Thanks! Next question....any way of playing video?