Hi. I’ve been noticing this on a few of my views. On some, I have a background image taking up the whole space on the view. There are buttons and other fields placed over this. When run, you can see the buttons and other fields, but the buttons seem to be disabled. I see in the designer, when I select one of the trouble buttons, there’s a red outline around the ImageView, telling me this must think it is part of the parent. I then dragged all the trouble items off to the side out of the entire view and used the Auto Layout guide to put them back in, thinking if I don’t drag them onto the ImageView, they shouldn’t think that is their parent. This was working ok for me yesterday (after doing the drag and replaced by AL), but then coming back in today and testing, the buttons have become inactive again and look to be part of the ImageView parent.
Setting the parent to NIL via declare would mean to release a subview from its parent UIView which results in it being released from memory. You’d need to attach it to another UIView (in that case the Xojo view itself) to keep it alive. You could do so with iOSLib where the control extension gives you access to the AppleView object (the UIView of the control itself) that knows the addsubview and removefromsuperview methods. But I wonder if this would really be a good solution
How about not using an imageview but the backgroundcolor (!) property of the UIView. You can create a UIColor (called AppleColor in iOSLib) from a picture. In the case, it is tiled to fill the view. If you scale it to the view’s size before, you should have your background image without an extra control behind.
Or, second possibility, address the content property of the view’s CALayer. Here you can attach an image directly.
EDIT: And a third thought: It could be the exclusiveTouch property of the imageview that will not send touch events down its subview chain when it’s set to true. That’s changeable with iOSLib too.