Using iOSImageViewer As Background Image

If you are building an app, and you don’t want to have a plain white background, but maybe an image created in Photoshop to make the background more visually appealing, what is the best way to do that?

I was messing around with the iOSImageViewer as a background image, but it seems you can’t place buttons on an iOSImageViewer. If you do, the button does not work anymore. So is there a way to make a button work on an iOSImgeViwer, or as other posts have suggested, is white the new black?

Maybe this helps you:

Hi Ulrich,

I was looking at this post earlier, but a little confused how to do this. If I have a view called View1 and a background image called BGImage.jpg which has been dragged into the project, I can use this code to create a background for View1? I try doing that and I get errors.

dim BGColor as new AppleColor (BGImage) // If you have an image BGImage in your project
View1.AppleView.BackgroundColor = BGColor

What am I doing wrong or am I not interpreting this correctly?

This all was around iOSLib. In the current version of Xojo, it’s not possible to set an image as a view’s background without declares. Did you drag iOSLib into your project?

No, I guess I did not do that. I just found the iOSLib, but trying to figure out which class to drag over. There are a lot of files at

Am I suppose to drag the entire IOSLib folder into the project? When I do drag the whole folder into the project without anything else, I get a whole bunch of errors when I try to run it. What am I missing?

It is a lot simpler to place a canvas over the view and drawImage in Paint.

Contrary to an imageView, it does not inhibit the button Action event.

Thanks Michel. Thats just what I was looking for. That was easy. I appreciate it.