Objects distance from the bottom of the screen with a Tab bar

How do I keep the distance of an object from the bottom of the screen in both the IDE and Runtime for all situations?

Objects I place on a View and lock to the Parent bottom, firstly need to be a considerable negative offset (and not standard) not to be obscured by the tab bar and the distance also varies depending on Portrait or Landscape orientation.

Thanks for any help

Chris

I think this is what you need with a TabBar

And change the offset to your liking.

Stop on! Thanks very much Jeremie for taking the time.

Does Auto Layout work with iOSScrollableAreas ? I have an object that will centre fine in a View, but when I attach the same settings in a iOSScrollableArea and the iOSScrollableArea is locked to the left, top, width & height of Parent (view), the object remains left/top justified.

Thanks

[quote=474008:@Chris O’Brien]Does Auto Layout work with iOSScrollableAreas ? I have an object that will centre fine in a View, but when I attach the same settings in a iOSScrollableArea and the iOSScrollableArea is locked to the left, top, width & height of Parent (view), the object remains left/top justified.

Thanks[/quote]
Instead of Width and Height, try Right and Bottom.

Thanks again(!) Greg - I tried it, but it didn’t seem to make a difference - I’ll play around with it a bit more and come back to you if I’m still unable to manage it.

The iOSScrollableArea and its content are two different elements.

When setting the content of an iOSScrollableArea, the content will be locked to the top left until you define auto-layout constraints.

To display any ContainerControl centered in an iOSScrollableArea, you will need this method in a module:

[code]Public Sub SetContentFullScreen(extends scroll as iosScrollableArea, content As iOSControl, FullWidth As Boolean = False)

scroll.Content = content

//Center the cc
Dim cons As iOSLayoutConstraint

cons = New iOSLayoutConstraint(content, _
iOSLayoutConstraint.AttributeTypes.CenterX, _
iOSLayoutConstraint.RelationTypes.Equal, _
scroll, _
iOSLayoutConstraint.AttributeTypes.CenterX, _
1.0, 0)
cons.Active = True
scroll.AddConstraint(cons)

If FullWidth Then
cons = New iOSLayoutConstraint(content, _
iOSLayoutConstraint.AttributeTypes.Width, _
iOSLayoutConstraint.RelationTypes.Equal, _
scroll, _
iOSLayoutConstraint.AttributeTypes.Width, _
1.0, 0)
cons.Active = True
scroll.AddConstraint(cons)

cons = New iOSLayoutConstraint(content, _
iOSLayoutConstraint.AttributeTypes.Height, _
iOSLayoutConstraint.RelationTypes.GreaterThanOrEqual, _
scroll, _
iOSLayoutConstraint.AttributeTypes.Height, _
1.0, 0)
cons.Active = True
scroll.AddConstraint(cons)

Else
Break

End if

End Sub
[/code]

And call it in the iOSView.Open event (or afterwards if adding the Container by code):

theScrollableArea.SetContentFullScreen(theContainerControl, False) //Or True if you want it to be fullwidth

Many thanks Jeremie! - I’ll check this out and come back to you. Chris

Jeremie, that worked a charm! Thanks very much for your time