I have a view with a couple of canvases acting as buttons. They’re a bit higher in size since I have some text I want to display in each. I recently added another canvas, and because of space limitations on smaller iPhone screens, I thought to use a ContainerControl and ScrollableArea. It appears the PushTo event does not work in a ContainerControl. Does anyone have a workaround to this?
Two solutions:
-
Add an Event Definition to the ContainerControl.
Call that event in your Canvas and pass the view to be pushed to
In the iOSview that holds the ContainerControl handle the event -
Add the following properties to the container control:
[code]Public Property parentView as iOSView
Get
if mParentView <> Nil then
Return iOSView(mParentView.Value)
end if
End Get
Set
mParentView = xojo.core.WeakRef.Create(value)
End Set
End Property
[/code]
Private Property mParentView as xojo.Core.WeakRef
In the iOSView.Open event:
ContainerControl1.parentView = self
You can then call parentView.PushTo(SomeOtherView) in you Canvas buttons
Thanks Jeremie! I will give this a try and let you know if I have any issues